On 9/9/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > For the builtins, it would actually be possible to do this by simply > importing an alternate builtins module. Something like > > from future_builtins import min, max, zip, range >
Yes. A straightforward solution... > For methods on standard objects like dicts it's not really possible > either way; the type of a dict is determined by the module containing > the code creating it, not the module containing the code using it. > I had that in mind when I wrote my post; changing types is not the way, that will not work. That is why I proposed __future__ (I really do not know very well the implementation details of that feature) because I think the parser/compiler can (magically) make the replacements, e.g. dict.items -> dict.iteritems for Py2.X series in codes *using* dicts . Do you think something like this could be implemented in a safer way? -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com