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/2005-June/054468.html below:

[Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

[Python-Dev] Adding the 'path' module (was Re: Some RFE for review) [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Mon Jun 27 17:10:17 CEST 2005
Phillip J. Eby wrote:
> At 08:20 AM 6/27/2005 +0100, Michael Hoffman wrote:
>>os.getcwd() returns a string, but path.getcwd() returns a new path
>>object.
> 
> In that case, I'd expect it to be 'path.fromcwd()' or 'path.cwd()'; i.e. a 
> constructor classmethod by analogy with 'dict.fromkeys()' or 
> 'datetime.now()'.  'getcwd()' looks like it's getting a property of a path 
> instance, and doesn't match stdlib conventions for constructors.
> 
> So, +1 as long as it's called cwd() or something better (i.e. clearer 
> and/or more consistent with stdlib constructor conventions).

You're right. +1 for calling it fromcwd().

With that settled, should I rewrite the module? Should I write a PEP?

Reinhold

-- 
Mail address is perfectly valid!

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