[ckan-changes] [ckan/ckan] 9d8af3: Don't set a default argument as a mutable type

GitHub noreply at github.com
Thu Feb 22 22:50:22 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: 9d8af3def412caa7a3242cf3a36c4371d4d3a2ee
      https://github.com/ckan/ckan/commit/9d8af3def412caa7a3242cf3a36c4371d4d3a2ee
  Author: Carl Lange <carl at flax.ie>
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
    M ckan/lib/mailer.py

  Log Message:
  -----------
  Don't set a default argument as a mutable type

When you run this a second time, `headers` will be the value they were last time you ran it. That seems bad.

http://docs.python-guide.org/en/latest/writing/gotchas/


  Commit: ef0598b7529fc76a79cd6e35909a0e3a359a5658
      https://github.com/ckan/ckan/commit/ef0598b7529fc76a79cd6e35909a0e3a359a5658
  Author: Carl Lange <carl at flax.ie>
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
    M ckan/lib/mailer.py

  Log Message:
  -----------
  Fix pep8


  Commit: 3251b50025e869aaa9f1c508f3165b70de539948
      https://github.com/ckan/ckan/commit/3251b50025e869aaa9f1c508f3165b70de539948
  Author: Ian Ward <ian at excess.org>
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
    M ckan/lib/mailer.py

  Log Message:
  -----------
  Merge pull request #4034 from CarlQLange/patch-4

Don't set a default argument as a mutable type


Compare: https://github.com/ckan/ckan/compare/88b5aa3b1838...3251b50025e8


More information about the ckan-changes mailing list