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/1999-June/095429.html below:

[Python-Dev] String methods... finally

[Python-Dev] String methods... finally [Python-Dev] String methods... finallyTim Peters tim_one at email.msn.com
Sat Jun 12 20:28:18 CEST 1999
[Tim]
> expandtabs is used frequently in IDLE and even pyclbr.py now.
> Curiously, though, they almost never want the tab-expanded string,
> but rather its len.

[/F]
> looked in stropmodule.c lately:
>
> static PyObject *
> strop_expandtabs(self, args)
> ...
>  /* First pass: determine size of output string */
> ...
>  /* Second pass: create output string and fill it */
> ...
>
> (btw, I originally wrote that code for pythonworks ;-)

Yes, it's nice code!  The irony was the source of my "curiously" <wink>.

> how about an "expandtabslength" method?

Na, it's very specialized, easy to spell by hand, and even IDLE/pyclbr don't
really need more speed in this area.

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