A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-July/016344.html below:

[Python-Dev] Changing the Division Operator -- PEP 238, rev 1.12

[Python-Dev] Changing the Division Operator -- PEP 238, rev 1.12Michael Hudson mwh@python.net
28 Jul 2001 05:35:01 -0400
Not directly relavent to the PEP, but...

Guido van Rossum <guido@zope.com> writes:

>     Q. What about code compiled by the codeop module?
> 
>     A. Alas, this will always use the default semantics (set by the -D
>        command line option).  This is a general problem with the
>        future statement; PEP 236[4] lists it as an unresolved
>        problem.  You could have your own clone of codeop.py that
>        includes a future division statement, but that's not a general
>        solution.

Did you look at my Nasty Hack(tm) to bodge around this?  It's at 

    http://starship.python.net/crew/mwh/hacks/codeop-hack.diff

if you haven't.  I'm not sure it will work with what you're planning
for division, but it works for generators (and worked for nested
scopes when that was relavent).

There are a host of saner ways round this, of course - like adding an
optional "flags" argument to compile, for instance.

Cheers,
M.

-- 
  ARTHUR:  Why should a rock hum?
    FORD:  Maybe it feels good about being a rock.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 8



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4