Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • If this was put into use in a module, would setattr be called everytime I use the class a? Commented Jul 29, 2013 at 17:06
  • only at first module import Commented Jul 29, 2013 at 17:08
  • So if multiple modules call this module, it will only call setattr once? Commented Jul 29, 2013 at 17:12
  • 2
    Only once, second and more module import connects to namespace. Commented Jul 29, 2013 at 17:19
  • This doesn't make much sense. It tries to make _func both an object method and a class method. It would have been better just to use @classmethod on _func. Commented Jul 29, 2013 at 17:24