Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'path,': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'return,': 0.09; 'splitting': 0.09; 'tuple': 0.09; 'wrote:': 0.15; 'filename,': 0.16; 'rantingrick': 0.16; 'pm,': 0.16; 'header:In- Reply-To:1': 0.22; 'string': 0.26; 'named': 0.32; 'to:addr:python- list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User- Agent:1': 0.34; 'skip:" 10': 0.36; 'could': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'methods': 0.40; 'subject:!': 0.67; 'introduce': 0.79; 'methods)': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: PyWart: os.path needs immediate attention! Date: Fri, 29 Jul 2011 19:30:55 -0400 References: <14874f59-a836-4031-a8c9-6b24f4d5e812@d7g2000vbv.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 206.205.249.126 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <14874f59-a836-4031-a8c9-6b24f4d5e812@d7g2000vbv.googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311982257 news.xs4all.nl 23906 [2001:888:2000:d::a6]:33426 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10556 On 7/29/2011 1:22 PM, rantingrick wrote: > * Introduce a new method named "partition" which (along with string > splitting methods) will replace the six methods "basename", "dirname", > "split", "splitdrive", "splitunc", "splittext". The method will return > a tuple of the path split into four parts: (drive, path, filename, > extension). A named tuple would be an even better return, so one could refer to the parts as t.drive, etc.