A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033721.html below:

[Python-Dev] Code Generation Idea Was: Bytecode idea

[Python-Dev] Code Generation Idea Was: Bytecode idea [Python-Dev] Code Generation Idea Was: Bytecode ideaSkip Montanaro skip@pobox.com
Wed, 26 Feb 2003 10:22:24 -0600
    Paul> Would it be simpler to institute a special rule that True = 1 is
    Paul> silently ignored, but True = anything else generates an error
    Paul> message?  Or am I overlooking something important?

For code that wants to cleanly cross the boundary between Python with no
boolean type and Python with a boolean type, you sometimes see

    True = 1==1
    False = 1==0

You get True and False if it didn't exist before and have the added benefit
that if it does exist, it gets found in globals() or locals() instead of in
__builtins__ and has the right type.

Skip



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