A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-January/032111.html below:

[Python-Dev] properties on modules?

[Python-Dev] properties on modules? [Python-Dev] properties on modules?Samuele Pedroni pedronis@bluewin.ch
Mon, 13 Jan 2003 19:17:34 +0100
From: "Neil Schemenauer" <nas@python.ca>
> It would be really cool if this worked:
> 
> import time
> now = property(lambda m: time.time())
> 
> Obviously a silly example but I hope the idea is clear.  Is there a
> reason this couldn't be made to work?
> 

it does not work any less than:

>>> import time
>>> class C(object): pass
...
>>> c=C()
>>> c.new=property(lambda o: time.time())
>>> c.new
<property object at 0x00796FE0>

modules are instances of a types, not types.

So the issue is about instance-level property apart the module thing details.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4