A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-August/028248.html below:

Automatic flex interface for Python?

[Python-Dev] Re: Automatic flex interface for Python? [Python-Dev] Re: Automatic flex interface for Python?Tim Peters tim.one@comcast.net
Fri, 23 Aug 2002 12:53:02 -0400
[attribution lost]
>>> It's an implementation problem.  You find yourself doing a lot of
>>> string accessing and pasting, creating several new objects per
>>> input char.

[Greg Ewing]
>> Not necessarily! Plex manages to do it without any
>> of that.
>>
>> The trick is to leave all the characters in the input
>> buffer and just *count* how many characters make up
>> the next token.

[/F]
> you can do that without even looking at the characters?

1-character strings are shared; string[i] doesn't create a new object except
for the first time that character is seen.  string_item() in particular uses
the character found to index into an array of 1-character string objects.




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