On Oct 23, 8:01 am, Peter Otten <__pete...@web.de> wrote:
> You may be better off with __getattr__().
Ayup, thanks. (Maybe I should have googled for "python equivalent of
ruby method_missing", hmm?;)
--
http://mail.python.org/mailman/listinfo/python-list
Phlip wrote:
> Pythonistas:
>
> Here's the property decorator:
>
>@property
>def foo(self): return 'bar'
>
> If I generate foo dynamically, how to I make it a property?
>
> setattr(self, 'foo', property(lambda: 'bar'))
>
> Variations of that are apparently not working.
You have to