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/032138.html below:

[Python-Dev] properties on modules?

[Python-Dev] properties on modules? [Python-Dev] properties on modules?Jeff Epler jepler@unpythonic.net
Mon, 13 Jan 2003 18:30:40 -0600
On Mon, Jan 13, 2003 at 09:34:20AM -0800, Neil Schemenauer wrote:
> 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?

I don't know, but if you create time.now, then will *both* of these work?
    print time.now

    from time import now
    print now

If not, it would be quite counterintuitive.

Jeff



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