[Python-Dev] properties on modules?

Skip Montanaro skip@pobox.com
2003年1月13日 14:36:28 -0600


 Samuele> From: "Skip Montanaro" <skip@pobox.com>
 >> I think the question is still open whether or not modules should
 >> be able to support properties, though I do think the ball is back in his
 >> court to come up with a less contrived example.
 Samuele> if module.prop would be a property
 Samuele> then
 Samuele> from module import prop
 Samuele> would probably not do what one may expect...
 Samuele> I think this kill it.
On the other hand, it might be a rather elegant way to prevent people from
accessing volatile module-level objects using "from module import
prop". <0.5 wink>
Skip

AltStyle によって変換されたページ (->オリジナル) /