On Fri, Jul 25, 2008 at 6:39 PM, Dino Viehland
<[EMAIL PROTECTED]> wrote:
> To enable a better story w/ .NET we would like
> to enable from System.DateTime import Parse – supporting the import of
> static functions.

That seems reasonable, and it's consistent with being able to import
static functions from static classes, which I like.

>  But the interesting question then becomes should we allow
> from System.DateTime import Now – a static property?

Yes. To be honest I'd rather see this either disallowed altogether, or
to function as it does currently. If you import a static property,
it's like treating it as a module scoped variable in python, so it
should behave like one, giving you the value of the property at import
time. This means importing Now would make no sense unless you want the
time at import. However, think if MaxValue was implemented as a static
property. Treating it as a module scoped variable makes sense.

  Finally, should we
> allow from System.DateTime import AddMonths – an instance method?

No. There is no precedent for that, it would be unexpected behavior.

-Dan
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to