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/2001-February/012924.html below:

[Python-Dev] SyntaxError for illegal literals

[Python-Dev] SyntaxError for illegal literalsGuido van Rossum guido@digicool.com
Thu, 15 Feb 2001 09:51:53 -0500
> [Ka-Ping Yee]
> > ...
> > The only exceptions that don't currently conform, as far as i
> > know, have to do with invalid literals.

[Tim]
> Pretty much, but nothing's *that* easy.
> 
> Other examples:
> 
> + If there are too many nested blocks, it raises SystemError(!).
> 
> + MemoryError is raised if a dotted name is too long.
> 
> + OverflowError is raised if a string is too long.
> 
> Note that those don't have to do with syntax, they're arbitrary
> implementation limits.  So that's the rule:  raise
> 
>     SystemError if something is bigger than 20
>     MemoryError if it's bigger than 1000
>     OverflowError if it's bigger than an int
> 
> Couldn't be clearer <wink>.
> 
> + SystemErrors are raised in many other places in the role of internal
> assertions failing.  Those needn't be changed.

Note that MemoryErrors are also raised whenever new objects are
created, which happens all the time during the course of compilation
(both Jeremy's symbol table code and of course code objects).  These
needn't be changed either.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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