[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1742826 - in /subversion/trunk: subversion/tests/cmdline/ subversion/tests/cmdline/svntest/ tools/client-side/ tools/server-side/svnpubsub/

From: Stefan Fuhrmann <stefan2_at_apache.org>
Date: Tue, 10 May 2016 01:06:20 +0200

On 10.05.2016 00:15, Daniel Shahaf wrote:
> stefan2_at_apache.org wrote on Sun, May 08, 2016 at 14:15:43 -0000:
>> ######################################################################
>> +# Permission constants used with e.g. chmod() and open().
>> +# Define them here at a central location, so people aren't tempted to
>> +# use octal literals which are not portable between Python 2 and 3.
> For future reference, octal constants with leading "0o" work in both py2
> and py3:
>
>>>> 0o777 # works in py2 and py3
>>>> 0777 # works in py2; syntax error in py3
Interesting. The online source that I found made it seem
like there was no compatible way and suggested decimals.

Anyway, using symbolic constants is certainly even better.

-- Stefan^2.
Received on 2016-05-10 01:06:26 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.