Hoi,

> gmane workaround

What drives me nuts personally is the default __repr__ of classes. (type
instances and not class instances).

Currently it looks like this::

    >>> Foo
    <class '__main__.Foo'>
    >>> mymodule.Foo
    <class 'mymodule.Foo'>

IMHO a better way is this one:

    >>> Foo
    Foo
    >>> mymodule.Foo
    mymodule.Foo

Because only classes and singletons (like True/False/None(/Ellipsis?)) have a
similar repr that's not such a big problem.

Especially for datetime this will be much more consistent then:

    >>> datetime.datetime.now()
    datetime.datetime(2007, 1, 10, 20, 43, 7, 52890)
    >>> datetime.datetime
    datetime.datetime

The advantages:

-   Smaller Output when working with the CLI
-   evalable (okay, that's not the best argument)
-   consistent (see the datetime example)

Regards,
Armin

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to