[Python-Dev] Choosing a best practice solution for Python/extension modules (original) (raw)
Aahz aahz at pythoncraft.com
Fri Feb 20 21:53:29 CET 2009
- Previous message: [Python-Dev] Choosing a best practice solution for Python/extension modules
- Next message: [Python-Dev] Choosing a best practice solution for Python/extension modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 20, 2009, Brett Cannon wrote:
On Fri, Feb 20, 2009 at 12:37, Brett Cannon <brett at python.org> wrote:
On Fri, Feb 20, 2009 at 12:31, Daniel Stutzbach <_ _daniel at stutzbachenterprises.com> wrote:
A slight change would make it work for modules where only key functions have been rewritten. For example, pickle.py could read: from pypickle import * try: from pickle import * except ImportError: pass True, although that still suffers from the problem of overwriting things like name, file, etc. Actually, I take that back; the IMPORTSTAR opcode doesn't pull in anything starting with an underscore. So while this alleviates the worry above, it does mean that anything that gets rewritten needs to have a name that does not lead with an underscore for this to work. Is that really an acceptable compromise for a simple solution like this?
Doesn't all control this?
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
- Previous message: [Python-Dev] Choosing a best practice solution for Python/extension modules
- Next message: [Python-Dev] Choosing a best practice solution for Python/extension modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]