[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc. (original) (raw)
Benji York benji at benjiyork.com
Fri May 11 23:28:24 CEST 2007
- Previous message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Next message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip J. Eby wrote:
At 12:05 AM 5/11/2007 -0400, Jim Jewett wrote:
So we're mostly in agreement, but I had also wanted to leave out importString.
I know it can seem simpler to treat everything as an object, and not worry about where the type switches from package to module to instance to attribute. I see it used in Twisted. But I'm not sure it is really simpler for someone who isn't familiar with your codebase, The use case is to be able to have a string that refers to an importable object. The unittest module has something similar, egg entry points do, and so does modpython. (I wouldn't be surprised if modwsgi has something like that also.) Chandler's repository (object database) also had code to "load classes" by using a string import, before I got there.
zope.interface also allows "lazy" imports using string versions of module names in specific circumstances where circular dependencies are common.
Benji York http://benjiyork.com
- Previous message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Next message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]