[Python-Dev] elementtree in stdlib (original) (raw)
Georg Brandl g.brandl at gmx.net
Fri Apr 7 15:00:21 CEST 2006
- Previous message: [Python-Dev] elementtree in stdlib
- Next message: [Python-Dev] elementtree in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greg Ewing wrote:
Trent Mick wrote:
try: import xml.etree.ElementTree as ET # in python >=2.5 except ImportError: > ... etc ad nauseam For situations like this I've thought it might be handy to be able to say _import xml.etree.ElementTree or cElementTree or _ elementtree.ElementTree or lxml.etree as ET
Suppose I wanted to implement that, what would be the best strategy to follow:
- change handling of IMPORT_NAME and IMPORT_FROM in ceval.c
- emit different bytecodes in compile.c
- directly create TryExcept AST nodes in ast.c ?
Georg
- Previous message: [Python-Dev] elementtree in stdlib
- Next message: [Python-Dev] elementtree in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]