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/2004-September/048861.html below:

[Python-Dev] PEP 292: method names

[Python-Dev] PEP 292: method names [Python-Dev] PEP 292: method namesErik Heneryd erik at heneryd.com
Mon Sep 13 18:16:08 CEST 2004
Barry Warsaw wrote:
> On Sat, 2004-09-11 at 07:54, Erik Heneryd wrote:
> 
> 
>>* Too long
>>10/15 character names for something so simple it up until now just 
>>needed a %?  Programs using templates will probably use them 
>>frequently...  I'd prefer sub instead of substitute.
> 
> 
> Noted, thanks.  In general I'm not a fan of abbreviations in APIs
> though.  Also note that it is trivial for applications to derive and
> override __mod__(), aliasing it to whichever version of substitute()
> they want.  For example, I plan on multiply inheriting Template and
> unicode, and aliasing __mod__() to safe_substitute().

-1

Well, even if it's trivial, I still think the out-of-the-box API 
shouldn't be hostile against frequent use.  Subclassing just to get a 
decent name/operator feels stupid.  Why not __mod__ = safe_substitute 
per default then?


Erik
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