Poul-Henning Kamp added the comment:
Please note that the mode is not just a parameter, it is also a data field
inside the encoded input.
See: https://en.wikipedia.org/wiki/Uuencoding
(search for "mode")
--
___
Python track
Poul-Henning Kamp added the comment:
I was just playing with it in a prototype and noticed that it didn't work.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Poul-Henning Kamp :
Library file uu.py on at least 2.7 and 3.6 contains:
try:
os.path.chmod(out_file, mode)
except AttributeError:
pass
As far as I can tell, os.path.chmod does not exist, so this always raises
New submission from Poul-Henning Kamp:
I'd like to nominate this piece of code as candidate for the next round of
"Most unexpected python behaviour" awards:
def foo(a, x = []):
x.append(a)
return x
print(foo(1))
print(foo(2))
I expected the outpu
Poul-Henning Kamp added the comment:
I have tried hard, but have utterly failed to figure out why you have chosen
the semantics for ^ you mention, tried to come up with a plausible use case,
and I have utterly failed.
I find it distinctly counter intuitive.
I think the Principle of Least
New submission from Poul-Henning Kamp:
I'm surprised that this does not find any matches:
import re
r = re.compile("^abc")
s = "0123abcxyz"
for i in range(0,len(s)):
print(i, r.search(s, i))
I would have expected the i==4 case to match ?
Poul-Henning Kamp added the comment:
POLA = Principle Of Least Astonishment
We use that a lot in architectural decision in FreeBSD :-)
As I said: You deal with this as you see fit. If all python2 gets is a doc- or
errata-notice, that's perfectly fine with me.
I interpret "
Poul-Henning Kamp added the comment:
I have not tried io.open(), nor would I suspect most users would realize that
they needed to do so, in order to get the canonical behaviour from an operation
called "write" on a file opened in "append" mode.
IMO: If pythons file.write
Poul-Henning Kamp added the comment:
Yes, it does:
If the O_APPEND flag of the file status flags is set, the file offset shall be
set to the end of the file prior to each write and no intervening file
modification operation shall occur between changing the file offset and the
write operation
New submission from Poul-Henning Kamp:
When a file is opened in append mode, the operating system guarantees that all
write(2) system calls atomically appended their payload to the file.
At least on FreeBSD, Python breaks this guarantee, by chopping up large writes
into multiple write(2
10 matches
Mail list logo