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/088449.html below:

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

[Python-Dev] pyc files, constant folding and borderline portability issuesTerry Reedy tjreedy at udel.edu
Tue Apr 7 23:09:13 CEST 2009
Cesare Di Mauro wrote:
> On Tue, Apr 7, 2009 07:22PM, Guido van Rossum wrote:
>>> In my experience it's better to discover a bug at compile time rather
>>> than
>>> at running time.
>> That's my point though, which you seem to be ignoring: if the user
>> explicitly writes "1/0" it is not likely to be a bug. That's very
>> different than "1/x" where x happens to take on zero at runtime --
>> *that* is likely  bug, but a constant folder can't detect that (at
>> least not for Python).
>>
>> --
>> --Guido van Rossum (home page: http://www.python.org/~guido/)
> 
> I agree. My only concern was about user mistyping that can leed to an
> error interceptable by a stricter constant folder.
> 
> But I admit that it's a rarer case compared to an explicit exception
> raising such the one you showed.

I would guess that it is so rare as to not be worth bothering about.

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