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/2006-August/068313.html below:

[Python-Dev] Type of range object members

[Python-Dev] Type of range object members [Python-Dev] Type of range object membersGuido van Rossum guido at python.org
Wed Aug 16 19:23:43 CEST 2006
On 8/15/06, Neal Norwitz <nnorwitz at gmail.com> wrote:
> I was playing around with a little patch to avoid that penalty.  It
> doesn't take any additional memory, just a handful of bits we aren't
> using. :-)
>
> For the more common builtin types, it stores whether it's a subclass
> in tp_flags, so there's no function call necessary and it's a constant
> time operation.  It was faster when doing simple stuff.  Haven't
> thought much whether this is really worthwhile or not.

I like it! I wonder if you should use another bit for "inherits from
BaseException". That would make catching and raising exceptions a bit
faster. It applies cleanly to py3k -- perhaps you should just check it
in there? +1 from me!

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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