~danken/python-fixtures/staticmethod

Viewing all changes in revision 76.

  • Committer: Dan Kenigsberg
  • Date: 2014-01-19 02:03:30 UTC
  • Revision ID: danken@redhat.com-20140119020330-zmwjv6sm5frbdzi2
MonkeyPatch staticmethod

As noticed by Antoni S. Puimedon in http://gerrit.ovirt.org/23378/, in Python
2, setattr(Class, name, func) automatically converts a function into an
instancemethod. To keep type(Class.func) as function, staticmethod(func) must
be applied explicitly.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: