eryksun added the comment:
This name attribute is documented here:
http://docs.python.org/3/library/io#io.FileIO.name
3.4 Source:
http://hg.python.org/cpython/file/04f714765c13/Modules/_io/fileio.c#l432
In PY2, os.fdopen sets the name to ''. See the related issue 13781.
eryksun added the comment:
The redesigned peephole optimizer in PY3 improves constant folding. Limiting
this would be a step back. Plus you can get the same behavior in PY2 if you
first expand the power. For example:
# using 2**30, for a 32-bit process
def uncalled():
x = b
eryksun added the comment:
AFAIK, this doesn't affect Python 3 under normal circumstances. A file could be
manually set to text mode by calling msvcrt.setmode(f.fileno(), os.O_TEXT), but
that's out of the norm.
In Python 2, on Windows interpreting ctrl+z (0x1a) as end-of-file
eryksun added the comment:
Function equality is based on identity, as inherited from object. But there's a
precedent for this idea in method_richcompare, which compares the method's
__func__ and __self__:
http://hg.python.org/cpython/file/04f714765c13/Objects/classobj
eryksun added the comment:
multiprocessing.connection uses the _winapi module for overlapped I/O and named
pipes in case you're looking for examples:
http://hg.python.org/cpython/file/3.4/Lib/multiprocessing/connection.py
--
nosy: +er
eryksun added the comment:
In Py2Reg, the REG_BINARY (3) case sets `*retDataSize = 0` when the value is
None:
http://hg.python.org/cpython/file/04f714765c13/PC/winreg.c#l766
It doesn't modify *retDataBuf. Then in PySetValueEx, PyMem_DEL is called for
the uninitialized address in data:
eryksun added the comment:
> you can't overwrite a io.FileIO().name attribute
A FileIO instance uses a dict for 'name' (msg214670):
>>> vars(sys.stdin.buffer.raw)
{'name': ''}
>>> f = tempfile.TemporaryFile()
&g
eryksun added the comment:
classmethod_descriptor instances such as vars(dict)['fromkeys'] are callable.
The first argument has to be a subclass of __objclass__:
>>> vars(dict)['fromkeys'].__objclass__
Calling the descriptor creates a bound built-in metho
eryksun added the comment:
It works if you detach the buffer beforehand:
>>> import io, sys
>>> stdin = sys.stdin
>>> stdin.flush()
>>> correct_stdin = io.TextIOWrapper(stdin.buffer, 'utf-8')
>>
eryksun added the comment:
> I believe that this explains why you have to use this idiom
> inside __new__ when using super():
>
> def __new__(cls, x):
> super().__new__(cls, x)
Yes, if __new__ is defined and is a function, type_new replaces it with a
stat
eryksun added the comment:
This is the first time I've used msilib, but it does appear that the component
is marked as 64-bit:
>>> import msilib
>>> msidbComponentAttributes64bit = 256
>>> sql = ("SELECT ComponentId,Attributes FROM Compon
eryksun added the comment:
For a junction reparse point, Sysinternals junction.exe shows the "Print Name"
and "Substitute Name" are the same and it's not an NT \?? path (i.e.
\DosDevices, i.e. \Global??). OTOH, the substitute name does use an NT
DosDevices path w
eryksun added the comment:
Nevermind, strike "seems to work"; it doesn't work without the \?? prefix. I
stupidly assumed the DeviceIoControl call would validate the substitute name.
Of course it doesn't; it happily creates a broken junction. Opening the
junction with C
eryksun added the comment:
This should be fixed in os.symlink. The Windows CreateSymbolicLink function
can't be relied on to translate slash to backslash. It only normalizes an
absolute link, or a path that's relative to the current working directory on a
drive (e.g. "R:..
eryksun added the comment:
For some read Sysinternals junction utility doesn't show the raw substitute
name. Microsoft's fsutil shows the actual reparse data:
C:\>mklink /J Python34 "C:\Program Files\Python34"
Junction created for Python34 <<===>&g
eryksun added the comment:
The patch fixes `python 2>&1 | cat.exe` for me on Windows, where cat.exe is
from GnuWin32. The tests also pass. It looks like failing would entail hanging
until a timeout.
--
nosy: +eryksun
___
Python tracker
eryksun added the comment:
The shape for the StructWithArrays test should be () in 3.x; it's None in 2.x.
--
nosy: +eryksun
versions: +Python 3.3 -Python 3.5
___
Python tracker
<http://bugs.python.org/is
eryksun added the comment:
How about using hard links (mklink /H) instead? It's a minor issue, but there's
a bug in Explorer that breaks opening symbolic links to EXE, COM, CMD, and BAT
files (exefile, comfile, cmdfile, batfile). Explorer displays the error message
"the spec
eryksun added the comment:
Here's a related superuser question:
http://superuser.com/q/304093
The message box shown in the older answer is what I get:
http://i.stack.imgur.com/bqXBs.png
The problem is only with Explorer. I can execute a symbolic link to an EXE via
eryksun added the comment:
Using a relative target in the link isn't the problem for me here. (See issue
13702 for another problem with relative links.) I'm in the same boat as
commenter weberc2. Same symptom; apparently a different problem.
I'm using an absolute path for
eryksun added the comment:
nt._isdir calls GetFileAttributes. CPython's stat implementation calls
CreateFile to get a handle to pass to GetFileInformationByHandle. If it can't
get a valid handle, it falls back to calling FindFirstFileW to get the file
information, bu
eryksun added the comment:
> but only for ERROR_SHARING_VIOLATION. Shouldn't this
> include ERROR_ACCESS_DENIED?
To clarify, I meant that I think it should fall back to using FindFirstFile for
either error, not that ERROR_SHARING_VIOLATION somehow includes
ERROR_ACCESS_DENIED. (P
eryksun added the comment:
ctypes LibraryLoader instances cache CDLL/WinDLL instances, which cache
function pointers. Using the global ctypes.cdll and ctypes.windll loaders can
lead to conflicting definitions for restype, argtypes, and errcheck. I suggest
using a private LibraryLoader in
eryksun added the comment:
See issue 16741. This is fixed in 3.3, but 2.7 intentionally keeps the old
behavior.
--
nosy: +eryksun
___
Python tracker
<http://bugs.python.org/issue21
eryksun added the comment:
> Why does help() enter a more-mode for even short help?
`more` exits if there's less than a page of a text. The default for `less` is
to quit when "q" is entered. You may be interested in the option -e
(quit-at-eof).
> Why doesn'
eryksun added the comment:
The constructor tries __trunc__ (truncate toward 0) if __int__ isn't defined.
If __trunc__ doesn't return an instance of int, it calls the intermediate
result's __int__ method. In terms of the numbers ABCs, numbers.Real requires
__trunc__, which
eryksun added the comment:
You can use '-P?e(END) .(q to quit)' to add (END) just on the last line. Or
show the line count instead:
os.environ['LESS'] = '-Pline %lB?L/%L. (press h for help or q to quit)'
--
___
eryksun added the comment:
site.addpackage calls site.makepath(sitedir, line):
def makepath(*paths):
dir = os.path.join(*paths)
try:
dir = os.path.abspath(dir)
except OSError:
pass
return dir, os.path.normcase(dir)
In 2.7.7
eryksun added the comment:
A Windows path uses ":" after the drive letter, e.g. "C:\\Windows", so the
delimiter is a semicolon on Windows. Other platforms use a colon.
CPython uses DELIM, which is defined in osdefs.h. This header isn't included by
Python.h.
http://h
eryksun added the comment:
This is fixed for subprocess.Popen in 2.7, 3.1, and 3.2; see issue 2304. In
2.7, nt.popen still has this problem. As mentioned above, it can be worked
around by using subprocess.Popen as described here:
https://docs.python.org/2/library/subprocess.html#replacing-os
eryksun added the comment:
`idle.pyw -E` passes an invalid argument, and pythonw.exe doesn't inherit the
console to print the usage text to stderr. The -E option needs to be passed to
the interpreter:
C:\Python34>pythonw.exe -E Lib/idlelib/idle.pyw
Or run idlelib as a script:
eryksun added the comment:
The py.exe launcher relies on manual quoting in the shebang line. That's the
case for the shebang embedded in this pip executable. The problem is the
"simple launcher" used by distlib 0.1.8. It always quotes the executable, even
if it's already q
eryksun added the comment:
Refer to the documentation for deprecated __getslice__ when slicing an instance
of a classic class:
https://docs.python.org/2/reference/datamodel.html#object.__getslice__
The SLICE+3 implementation (apply_slice) calls PySequence_GetSlice if both
index values can be
eryksun added the comment:
cp65001 was added in Python 3.3, for what it's worth. For me codepage 65001
(CP_UTF8) is broken for most console programs.
Windows API WriteFile gets routed to WriteConsoleA for a console buffer handle,
but WriteConsoleA has a different spec. It returns the n
eryksun added the comment:
> Setting the Windows console encoding to cp65001 using the chcp
> command doesn't make the Windows console fully Unicode compliant.
> It is a little bit better using TTF fonts, but it's not enough.
> See the old issue #1602 opened 7 years
eryksun added the comment:
> sys.stdout.write() doen't use WriteFile. Again, see the
> issue #1602 if you are interested to improve the Unicode
> support of the Windows console.
_write calls WriteFile because Python 3 sets standard I/O to binary mode. The
source is distribut
eryksun added the comment:
It could also mention the generic getter and setter functions for the
PyGetSetDef that were added in 3.3: PyType_GenericGetDict and
PyType_GenericSetDict.
https://docs.python.org/3/c-api/object.html#c.PyType_GenericGetDict
--
nosy: +eryksun
eryksun added the comment:
16.17.2.2 already has a warning after it introduces CDLL, OleDLL, and WinDLL:
The Python global interpreter lock is released before
calling any function exported by these libraries, and
reacquired afterwards.
It links to the glossary entry:
https
eryksun added the comment:
This fix for issue 20731 doesn't address this bug completely because it's
possible for ftell to return -1 without an actual error, as test2.py
demonstrates.
In text mode, CRLF is translated to LF by the CRT's _read function (Win32
ReadFile). So th
eryksun added the comment:
You need to cast to a pointer type, i.e. POINTER(Struct). Trying to cast to
just Struct should raise a TypeError. Instead this revealed a bug in
cast_check_pointertype (3.4.1):
http://hg.python.org/cpython/file/c0e311e010fc/Modules/_ctypes/_ctypes.c#l5225
dict
eryksun added the comment:
For what it's worth, an explicit "exit" will set the return code to the last
error.
>>> subprocess.call("nonex & exit", shell=True, stderr=subprocess.DEVNULL)
9009
--
nosy: +eryksun
eryksun added the comment:
> PS C:\Users\jaraco> echo £ | py -3 -c "import sys;
> print(repr(sys.stdin.buffer.read()))"
> b'?\r\n'
> Curiously, it appears as if powershell is actually receiving
> a question mark from the pipe.
PowerShell calls ReadCon
eryksun added the comment:
Doskey is a command-line interface for a subset of the Win32 console API.
Macros are implemented as console input aliases by calling AddConsoleAlias.
http://msdn.microsoft.com/en-us/library/ms681935
You can load macros from a text file that defines aliases for
eryksun added the comment:
If __debug__ were referenced from the code object's co_consts instead of
checking locals, globals and builtins (LOAD_NAME), then optimize=1 would work
consistently for a given code object.
Currently in 3.4.1:
>>> dis.dis(compile("
eryksun added the comment:
cast calls ctypes._cast(obj, obj, typ). _cast is a ctypes function pointer
defined as follows:
_cast = PYFUNCTYPE(py_object,
c_void_p, py_object, py_object)(_cast_addr)
Since cast makes an FFI call that converts the first arg to c_void_p
eryksun added the comment:
Extending byref to support bytes and str objects sounds reasonable.
Here's another workaround to pass a bytes object with an offset:
from ctypes import *
from ctypes.util import find_library
class offset:
def __init__(self, arg, o
eryksun added the comment:
> Interesting that “cast” accepts a byte string. If this is
> intended behaviour, it would be good to document that.
> Currently it says it takes “an object that can be
> interpreted as a pointer”.
cast makes an FFI call:
_cast = PYFUNCTY
eryksun added the comment:
> The path to the default shell shouldn't change during the time
> of program execution.
On Windows the ComSpec environment variable could change during program
execution.
------
nosy: +eryksun
___
Python tra
eryksun added the comment:
Defaulting to just "cmd.exe" can execute an arbitrary program named "cmd.exe"
in the application directory or current directory.
When CreateProcess needs to find the shell to execute a batch file (.bat or
.cmd), it doesn't search for "
eryksun added the comment:
The buffer size only needs to be capped if WINVER < 0x602. This issue doesn't
apply to Windows 8 since it uses the ConDrv device driver instead of LPC.
Prior to Windows 8, WriteFile redirects to WriteConsoleA when passed a console
handle. This makes an LPC
eryksun added the comment:
decimal.Decimal 'floor division' is integer division that truncates toward 0
(see 9.4.2).
>>> Decimal('-0.5').__floor__()
-1
>>> Decimal('-0.5').__floordiv__(1)
Decimal('-0')
Numpy 1.8.1:
eryksun added the comment:
The problem is skip_whitespace mistakenly calls isspace instead of iswspace.
http://hg.python.org/cpython/file/c0e311e010fc/PC/launcher.c#l48
isspace has undefined behavior when the argument is "not EOF or in the range of
0 through 0xFF":
http://msdn.mic
eryksun added the comment:
Since BigEndianStructure doesn't explicitly define the instance slots, they get
the default slots for __dict__ and __weakref__. It wouldn't make sense to
exclude these slots from instances of the Point2 subclass, so there's no
mechanism for that. Y
eryksun added the comment:
The \\?\ extended-path prefix bypasses normal path processing. The path is
passed directly to the filesystem driver. For example, to accommodate the POSIX
namespace, NTFS allows any character except NUL and slash, so it happily
creates a directory named "foo.&q
eryksun added the comment:
It's a relative path if the share name lacks a trailing slash. Consider the
hidden share "//server/C$" for the C: drive. "C:" is a relative path, while
"C:/" is an absolute path. Similarly "//server/C$" is relative, while
eryksun added the comment:
On second thought, while the parallels between drives and shares are nice,
beyond that this makes no sense to me.
http://hg.python.org/cpython/file/c0e311e010fc/Lib/ntpath.py#l91
Windows uses hidden environment variables (e.g. "=C:") for the working
di
eryksun added the comment:
Line 116 should use normp[2:3] instead of normp[2].
http://hg.python.org/cpython/file/ee879c0ffa11/Lib/ntpath.py#l92
--
nosy: +eryksun
___
Python tracker
<http://bugs.python.org/issue22
eryksun added the comment:
It should only skip _ext_to_normal for an already extended path, i.e. a path
that starts with ext_namespace_prefix. Otherwise it needs to call
_ext_to_normal. For example:
Strip the prefix in this case:
>>> os.path._getfinalpathname(
eryksun added the comment:
Isn't this bug about the "root of a share" case with ntpath.isabs in 3.x and
2.7 (splitdrive was backported)? For example:
>>> os.path.isabs("//server/share")
False
>>> os.path.splitdrive('
eryksun added the comment:
> "//server" is just the same as "/server" or "///server".
Repeated slashes aren't collapsed at the start of a Windows path. Here's what I
get in Windows 7:
>>> os.listdir('/server')
[]
&
eryksun added the comment:
Maybe for an extended path it could try _getfinalpathname without the prefix.
If it isn't a valid path or the result isn't the same as _getfinalpathname
including the prefix, then skip calling _ext_to_normal. For example:
def resolve(self, path):
eryksun added the comment:
> If you take "//?/C:/" and join it with e.g. "foo", you get an
> absolute path (or, if you remove the drive's trailing slash, you
> get something that's invalid AFAIK).
FYI, DOS device names such as "C:" are NT sy
eryksun added the comment:
stdbuf is the typical way to apply the LD_PRELOAD trick:
https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html
There's also the "unbuffer" expect script:
http://expect.sourceforge.net/example/unbuffer.man.html
------
eryksun added the comment:
unbuffer works for me. It fakes a tty, so apt-get doesn't automatically enter
quiet mode.
import io
import subprocess
args = ['unbuffer', 'apt-get', 'download', 'firefox']
p = subprocess.Popen(args,
eryksun added the comment:
MSC has __declspec(deprecated). See http://stackoverflow.com/a/21265197, for
example. It's a level 3 (/W3) warning.
http://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.100%29.aspx
--
nosy: +eryksun
___
Python tr
eryksun added the comment:
When sizeof(c_wchar) == 2, it can just count the number of non-BMP ordinals in
the string. Another approach would be to use size =
pythonapi.PyUnicode_AsWideChar(init, None, 0), but then the whole function may
as well be implemented in the _ctypes extension module
eryksun added the comment:
The ctypes global LibraryLoader instances are convenient for Windows scripts
and applications. Actually what they cache is the library (a CDLL instance),
which in turn caches function pointers.
Python packages, on the other hand, shouldn't use these parti
eryksun added the comment:
>> As mentioned before, many packages can not handle paths with
>> spaces.
>
> This is "common knowledge", yet may not be true anymore.
Well, see issue 21699. pip 1.5.6 is still using distlib 0.1.8, so the
executable wrappers it creates
eryksun added the comment:
> How does this relate to issue 14201? That is, is the answer just
> "use getitem if you don't want caching"?
Unlike CDLL.__getitem__, LibraryLoader.__getitem__ does use the attribute
cache. Why use a LibraryLoader if you don't want the
eryksun added the comment:
> Packages do this because it's the natural thing to do
I guess the tutorial is channeling projects toward using the cdll/windll
LibraryLoader instances on Windows. It even shows using
cdll.LoadLibrary('libc.so.6') on Linux. That's equiva
eryksun added the comment:
See changeset 78f93eb7dd75. The names in the docs are wrong.
--
nosy: +eryksun
___
Python tracker
<http://bugs.python.org/issue18
eryksun added the comment:
FYI, this is implementation defined in C89:
... unless the file is opened with append mode in which case
it is **implementation-defined** whether the file position
indicator is positioned at the beginning or the end of the
file.
http://port70.net
Changes by eryksun :
--
title: Python 2: Open file in a+ mode doesn't go to the end -> Open file in a+
mode reads from end of file in Python 3.4
versions: +Python 3.4, Python 3.5 -Python 2.7
___
Python tracker
<http://bugs.python.org
eryksun added the comment:
> MSI (c) (C4:24) [08:42:21:565]: Note: 1: 2203 2:
> C:\Users\pierre\Doocuments\python-3.4.2.amd64.msi 3:
> -2147287037
"Doocuments" is probably a typo. Try again using "Documents".
--
nosy: +eryksun
_
eryksun added the comment:
In Python 2, the closer for sys.stdout is _check_and_flush, which flushes the
stream without closing the underlying FILE.
https://hg.python.org/cpython/file/ee879c0ffa11/Python/sysmodule.c#l1377
In Python 3, io.FileIO won't close the underlying file descript
eryksun added the comment:
What do you get for os.stat?
bak_path = r"C:\Users\EAARHOS\Desktop\Python Review\baseExcel.py"
print(os.stat(bak_path))
bak_path += '.bak'
print(os.stat(bak_path))
bak_path += '.bak'
print(os.stat(
eryksun added the comment:
When appending to a singly-referenced string, the interpreter tries to
reallocate the string in place. This applies to both `s += 'text'` and `s = s +
'text'`. Storing to a temp variable is adding a 2nd reference, so a new string
gets alloc
eryksun added the comment:
> i.e. the object id is the same after appending
Actually, that's wrong. bak_path is a compact string. So the whole object is
realloc'd, and the base address (i.e. id) could change. Check
PyUnicode_AsUnicode even if t
eryksun added the comment:
> Why not use c_size_t? Or is that incorrect in some cases?
Strictly speaking, size_t doesn't have to encompass the entire addressable
range, such as for architectures that use segmented addressing (e.g. near and
far pointers). Practically speaking, no
eryksun added the comment:
ctypes doesn't always handle bitfields correctly. In particular it doesn't
adapt the storage unit size when packed. A bitfield based on c_uint is always
stored in 4 bytes, even if _pack_ is set to 1. This is MSVC rules, so all is
well on Windows.
For exa
eryksun added the comment:
You won't find the __qualname__ data descriptor in dir(Foo.Bar) because it's
defined by the metaclass, `type`. Attributes from the metaclass have always
been excluded from the dir() of a class.
--
nosy
eryksun added the comment:
See type_dir:
https://hg.python.org/cpython/file/ab2c023a9432/Objects/typeobject.c#l2984
--
___
Python tracker
<http://bugs.python.org/issue22
eryksun added the comment:
Follow the "String Methods" link at the top of the string module documentation.
Or use this link:
https://docs.python.org/3.4/library/stdtypes.html#str.replace
See also help(str.replace) and help(str) in the interactive shell.
--
assignee: ->
eryksun added the comment:
__doc__ and __module__ are also getsets (to support built-in types), but it's
nothing to worry about since the attributes can't be deleted.
I think the most value added here is for listing __mro__ and the others that
Georg mentioned. Should the following
eryksun added the comment:
This is related to the fix for issue 14432. gen_send_ex sets f->f_tstate to
NULL, so PyFrame_IsRestricted segfaults:
#define PyFrame_IsRestricted(f) \
((f)->f_builtins != (f)->f_tstate->interp->builtins)
------
eryksun added the comment:
The fix for issue 14432 was applied to 3.3, but I'm pretty sure 2.x
PyFrame_IsRestricted is the only problem. Nothing else should see f_tstate when
it's NULL. Also, f_tstate was dropped from PyFrameObj
eryksun added the comment:
On Windows, shouldn't copy_scripts use UTF-8 instead of os.fsencode (MBCS)? The
Python launcher executes the shebang line on Windows, and it defaults to UTF-8
if a script doesn't have a BOM. See line 1105 in maybe_handle_shebang:
https://hg.python.org/cp
eryksun added the comment:
This isn't a bug in Python or tab completion. You can reproduce the fault by
referencing s.transformable twice and then deleting both references.
The getter for TransformableDrawable.transformable calls wrap_transformable to
create a wrapper for the underly
eryksun added the comment:
c_void_p's getfunc returns the address as an integer. In turn, an integer
argument gets converted to a C int. This mean you need to a create a new
c_void_p from the address for _as_parameter_, e.g.
self._as_parameter_ = c_void_p(self.g)
Or set restype
eryksun added the comment:
> the default value is EINVAL.
Should that be specified in the docs? Currently it states that "[t]he errno
attribute is then an approximate translation, in POSIX terms, of that native
error code".
https://docs.python.org/3/library/exceptions
eryksun added the comment:
This also affects SEH-related exceptions raised by ctypes. For example, VC++
uses exception code 0xE06D7363 (i.e. b'\xe0msc'), so unhandled VC++ exceptions
leak into Python like this:
>>> ctypes.windll.kernel32.RaiseException(0xe
eryksun added the comment:
This also hangs for me in 2.7.8 64-bit, Windows 7. To poll the pipe, the parent
process calls PeekNamedPipe, which blocks because the child has already called
ReadFile.
> It is possible that the problem is also present in Python 3.
multiprocessing switched
eryksun added the comment:
See issue 21699. This is fixed in distlib 0.1.9. The latest pip uses distlib
0.2.0, so just update from pip 1.5.6 to 6.0.3.
C:\>"C:\Program Files\Python27\Scripts\pip.exe" --version
eryksun added the comment:
> If the same problem exists in setuptools then it'll need to
> get fixed in setuptools (or pip will need to start writing
> it's own console scripts when installing from sdist too).
Will setuptools eventually switch to using distlib also? Curren
eryksun added the comment:
> actual_len = kernel32.GetModuleFileNameW(kernel32._handle, name, len(name))
A module handle is the module's base address. kernel32 is loaded at a 32-bit
base address in a 64-bit process, but I don't know whether that will always be
true in curre
eryksun added the comment:
> if (not version.GetFileVersionInfoW(name, None, size, ver_block) or
>not ver_block):
Arrays don't implement __bool__ and have fixed __len__, so ver_block is always
True. You could look at ver_block[0] or ver_block.value (i.e. the C st
eryksun added the comment:
It's not correct that "[The c_int] type is an alias for the c_long type on
32-bit systems". Actually it's an alias if int and long are the same size.
Here's the relevant snippet from __init__:
if _calcsize("i") == _calcsize(&
eryksun added the comment:
>super(type, cls).__setattr__(key, value)
In your case, super(type, cls).__setattr__ references object.__setattr__.
>>> super(type, MyClass).__setattr__.__objclass__
That's from the method resolution order (__mro__):
eryksun added the comment:
You attached a corrupt bytecode cache for stdlib bisect.py:
>>> f = open('test.pyc', 'rb')
>>> magic,tstamp = struct.unpack('>> magic27 = 62211 | (ord('\r') << 16) | (ord('\n') <
eryksun added the comment:
In ast.c, set_context checks for assignment to an empty tuple, but not an empty
list.
case List_kind:
e->v.List.ctx = ctx;
s = e->v.List.elts;
break;
case Tuple_kind:
if (asdl_seq_LEN(e->v.T
1 - 100 of 293 matches
Mail list logo