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

[Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objects

[Python-Dev] [NPERS] Re: a feature i'd like to see in python #2: indexing of match objectsMichael Urman murman at gmail.com
Thu Dec 7 15:28:30 CET 2006
On 12/7/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> (and while you guys are waiting, I suggest you start a new thread where
> you discuss some other inconsistency that would be easy to solve with
> more code in the interpreter, like why "-", "/", and "**" doesn't work
> for strings, lists don't have a "copy" method, sets and lists have
> different API:s for adding things, we have hex() and oct() but no bin(),
> str.translate and unicode.translate take different arguments, etc.  get
> to work!)

Personally I'd love a way to get an unbound method that handles either
str or unicode instances. Perhaps py3k's unicode realignment will
effectively give me that.

(And agreed on there being no reason that supporting indexing requires
supporting slicing.  But also agreed that match slicing could be as
useful as indexing. Really I don't use regexps enough in Python to
have a position; I was more interested in figuring out where the
type(m) == type(m[:]) idea had come from, as I had never formed it.)
-- 
Michael Urman  http://www.tortall.net/mu/blog
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