[Python-Dev] properties on modules? (original) (raw)
Guido van Rossum guido@python.org
Mon, 13 Jan 2003 13:49:22 -0500
- Previous message: [Python-Dev] properties on modules?
- Next message: [Python-Dev] properties on modules?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[NeilS]
> > 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?
[Me]
> The idea is not clear to me at all. Why can't you say > > now = lambda: time.time()
[Brian Q]
Presumably, he would prefer this syntax:
start = time.now to: start = time.now()
Aha.
The .NET framework implements "now" as a property rather than a function and I find it distasteful for some reason.
I have to agree with you -- I am -1 on such a feature.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] properties on modules?
- Next message: [Python-Dev] properties on modules?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]