On 17 April 2016 at 04:47, Chris Barker - NOAA Federal
wrote:
>> On Apr 13, 2016, at 8:31 PM, Nick Coghlan wrote:
>>
class Special(bytes):
def __fspath__(self):
return 'str-val'
obj = Special('bytes-val', 'utf8')
path_obj = fspath(obj, allow_bytes=True
On 16 April 2016 at 21:21, Stephen J. Turnbull wrote:
> Nick Coghlan writes:
>
> > On 15 April 2016 at 00:52, Stephen J. Turnbull wrote:
> > > Nick Coghlan writes:
> > >
> > > > The use case for returning bytes from __fspath__ is DirEntry, so you
> > > > can write things like this in low l
The outstanding bug with this patch right now is a regression in line
numbers causing the test for http://bugs.python.org/issue9936 to fail. I've
tried to debug it without success
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/
> On Apr 13, 2016, at 8:31 PM, Nick Coghlan wrote:
>
>>> class Special(bytes):
>>> def __fspath__(self):
>>> return 'str-val'
>>> obj = Special('bytes-val', 'utf8')
>>> path_obj = fspath(obj, allow_bytes=True)
>>>
>>> With #2, path_obj == 'bytes-val'. With #3, path_obj == 'str-
On 16 April 2016 at 14:46, Stephen J. Turnbull wrote:
> Paul Moore writes:
[...]
> > 1. I just want to pass the argument on to other functions - just do
> > so, stdlib functions will work fine.
>
> I think this is a bad idea unless you *need* polymorphism, but OK,
> it's "consenting adults".
Al
Victor Stinner writes:
> Hum.
>
> if (width == 0
> and height == 0
> and color == 'red'
> and emphasis == 'strong'
> or highlight > 100):
> raise ValueError("sorry, you lose")
>
> Please remove one space to vertically a
Paul Moore writes:
> On 16 April 2016 at 12:21, Stephen J. Turnbull wrote:
> > OK, you win, __fspath__ needs to be polymorphic.
> >
> > But you've just shifted me to -1 on "os.fspath": it's an attractive
> > nuisance. EIBTI, applications and high-level library functions should
> > use os.fs
Hi,
On 04/15/2016 07:43 PM, Guido van Rossum wrote:
> The update is already serving its real purpose: showing that style is
> debatable and cannot always easily be reduced to fixed rules.
>
As you said, there will be always some kind personal preferences or
style taste and one can see on the deb
On 16 April 2016 at 12:21, Stephen J. Turnbull wrote:
> OK, you win, __fspath__ needs to be polymorphic.
>
> But you've just shifted me to -1 on "os.fspath": it's an attractive
> nuisance. EIBTI, applications and high-level library functions should
> use os.fsdecode or os.fsencode.
I presume you
Nick Coghlan writes:
> On 15 April 2016 at 00:52, Stephen J. Turnbull wrote:
> > Nick Coghlan writes:
> >
> > > The use case for returning bytes from __fspath__ is DirEntry, so you
> > > can write things like this in low level code:
> > >
> > > def myscandir(dirpath):
> > >
10 matches
Mail list logo