[Python-Dev] Rethinking intern() and its data structure

Robert Collins robert.collins at canonical.com
Fri Apr 10 14:16:30 CEST 2009

On Fri, 2009-04-10 at 11:52 +0000, Antoine Pitrou wrote:
> Robert Collins <robert.collins <at> canonical.com> writes:
> > 
> > (errors.py is 3027 lines long with 347 exception classes).
> 347 exception classes? Perhaps your framework is over-engineered.
> Similarly, when using a heavy Web framework, reloading a Web app can take
> several seconds... but I won't blame Python for that.

Well, we've added exceptions as we needed them. This isn't much
different to errno in C programs; the errno range has expanded as people
have wanted to signal that specific situations have arisen. The key
thing for us is to have both something that can be caught (for library
users of bzrlib) and something that can be formatted with variable
substitution (for displaying to users). If there are better ways to
approach this in python than what we've done, that would be great.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090410/dc4cc5b2/attachment.pgp>

More information about the Python-Dev mailing list