[issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot

2019-10-28 Thread Inyeol Lee
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,

[issue16319] optional comma inside function argument list triggers syntax error

2012-10-25 Thread Inyeol Lee
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

[issue10544] yield expression inside generator expression does nothing

2010-11-26 Thread Inyeol Lee
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

[issue1184112] Missing trailing newline with comment raises SyntaxError

2008-04-17 Thread Inyeol Lee
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