New submission from Inyeol Lee :
Python3.8 pathlib treats dot between path stem and suffix as part of suffix in
general:
>>> a = pathlib.Path('foo.txt')
>>> a.stem, a.suffix
('foo', '.txt')
>>> a.with_suffix('')
PosixPath('foo')
However, if pathname ends with dot,
New submission from Inyeol Lee:
Ubuntu 12.04, python 3.2.3
Optional trailing comma causes syntax error if used for keyword-only argument
list:
These are OK --
def f(a, b,): pass
def f(a, b=None,): pass
These triggers syntax error --
def f(a, *, b,): pass
def f(a, *, b=None,): pass
python
New submission from Inyeol Lee inyeol@gmail.com:
Simple coroutine with for loop works:
def pack_a():
while True:
L = []
for i in range(2):
L.append((yield))
print(L)
pa = pack_a()
next(pa)
pa.send(1)
pa.send(2)
[1, 2
Inyeol Lee [EMAIL PROTECTED] added the comment:
Missing trailing newline still triggers error as of 2.5.1:
import parser
parser.suite(pass\n )
IndentationError: unexpected indent
parser.suite(if True:\n pass\n )
SyntaxError: invalid syntax
--
nosy: +inyeollee