Re: Native Code vs. Python code for modules

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pruebauno@latinmail.com

    Re: Native Code vs. Python code for modules

    On Jul 29, 11:56 pm, koblas <kob...@gmail.c omwrote:
    better if there was a way that if I have an "interface compatible"
    native (aka C) module that has better performance that there could be
    a way that python would give it preference.
    >
    e.g.
    >
    import random(version= 1.2, lang=c)
    or
    import random(version= 1.2, lang=py) # use the python version by
    default
    or
    import random # use the latest version in the "fastest" code (C
    given preference)
    >
    where there could be a nice set of "standard" key value pairs that
    could provide addtional hints as to what language and version of a
    library was to be used.
    I will only make a comment on automatic cModule importing. Some of
    what you are suggesting already happens (e.g. Elementree). In Python
    3.0 more of the "legacy" modules (e.g. StringIO) should also work that
    way. I don't know what the current status for Pickle is because
    cPickle had some additional internal functionality not available in
    regular Pickle that Zope was dependent on.
Working...