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/2009-April/088424.html below:

[Python-Dev] pyc files, constant folding and borderline portability issues

[Python-Dev] pyc files, constant folding and borderline portability issuesCesare Di Mauro cesare.dimauro at a-tono.com
Tue Apr 7 17:19:10 CEST 2009
In data 07 aprile 2009 alle ore 17:19:25, <skip at pobox.com> ha scritto:

>
>     Cesare> The only difference at this time is regards invalid operations,
>     Cesare> which will raise exceptions at compile time, not at running
>     Cesare> time.
>
>     Cesare> So if you write:
>
>     Cesare> a = 1 / 0
>
>     Cesare> an exception will be raised at compile time.
>
> I think I have to call *bzzzzt* here.  This is a common technique used
> during debugging.  Insert a 1/0 to force an exception (possibly causing the
> running program to drop into pdb).  I think you have to leave that in.
>
> Skip

Many tests rely on this, and I have changed them from something like:

try:
   1 / 0
except:
  ....

to

try:
  a = 1; a / 0
except:
  ....

But I know that it's a major source of incompatibilities, and in the final
code I'll enabled it only if user demanded it (through a flag).

Cesare
More information about the Python-Dev mailing list

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