Martin Panter added the comment:
This is how Python is meant to work; see
https://docs.python.org/2.7/faq/programming.html#how-do-i-create-a-multidimensional-list.
Unless there is something in the documentation that gave you the wrong
impression, I suggest we close this.
--
nosy:
Changes by Martin Panter vadmium...@gmail.com:
--
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24589
___
New submission from Zorceta:
Code and result:
```
class A:
def __init__(self):
self.data = {'a': 1, 'b': 2, 'c': 3}
def __getattr__(self, name):
print('in __getattr__, getting %s' % name)
if name in self.data:
Zorceta added the comment:
FYI:
ll = [[]]*10
[id(l) for l in ll]
[67940296, 67940296, 67940296, 67940296, 67940296, 67940296, 67940296,
67940296, 67940296, 67940296]
--
nosy: +zorceta
___
Python tracker rep...@bugs.python.org
Martin Panter added the comment:
FWIW, I still emails from the tracker, even the ones with my own comments and
changes. All I can suggest is check the address you have set, check for spam,
etc.
I don’t @mentioning will do anything here. But as long as the person is in the
nosy list they
New submission from Jos Dechamps:
After creating a list of lists, changing one element, leads to changes of all
the elements:
v=[[]]*10
v
[[], [], [], [], [], [], [], [], [], []]
v[3].append(3)
v
[[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]]
v=[[]]*10
v
[[], [], [], [], [], [],
Changes by Zorceta zorc...@gmail.com:
--
title: Customized attribute access causes infinite loop - Unappropriate issue
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24590
___
Bastiaan Albarda added the comment:
The * operator lets you use the same object multiple times, thereby saving
resources.
If you want unique objects use comprehension:
v = [[] for x in range(10)]
v[3].append(3)
v
[[], [], [], [3], [], [], [], [], [], []]
v[3] += [3]
v
[[], [], [], [3,
Changes by Zorceta zorc...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24590
___
___
Python-bugs-list
R. David Murray added the comment:
For help with programming, please try the python-list mailing list, or in this
case probably a java forum. If you find that there is really is a bug (this is
very unlikely) you can reopen this issue with more information about the
problem you found.
Padmanabhan Tr added the comment:
On Wednesday, July 8, 2015 7:56 PM, padmanabhan T R trp...@yahoo.com wrote:
Dear Mr Steven D'ApranoI have not gone through the relevant Source Codes;
purely based on my working with Python3 (Version 3.4.2) and the 'The Python
Library Reference manual,
Sameer Kulkarni added the comment:
I have added link to Standard Encodings :
https://docs.python.org/3/library/codecs.html#standard-encodings
and Python Specific Encodings :
https://docs.python.org/3/library/codecs.html#python-specific-encodings
--
keywords: +patch
nosy: +ksameersrk
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file39883/index_to_entry.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24583
___
Steve Dower added the comment:
You should start by posting this to python-list or StackOverflow, and I'd
suggest including code that can actually be run - it's far more precise than
pseudocode.
(Functions and modules get used a lot. It's far more likely there's a bug in
your code than in
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24583
___
New submission from alanf:
The command setup.py clean --all writes out information about nonexistent
directories that the script tried to clean but couldn't find. Example:
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
It would
New submission from arthur:
defined global var, glob.myVar, in separated module
imported module containing glob.myVar
in function1, func1():
glob.myVar =
func1Var = func2()
in function2, func2():
if (...):
glob.myVar+= abc
func2() # call func2() again - recursive
else:
return glob.myVar
I
New submission from Emanuel Barry:
On Windows and with the pre-compiled stdlib, the 'collections/__init__.py' file
doesn't match the compiled one, as hinted by the presence of OrderedDict, even
though it is now part of _collections. The interpreter works just as intended
since it uses the
Zachary Ware added the comment:
I'm not sure I follow what you think is wrong. Are you expecting there to be no
OrderedDict in Lib/collections/__init__.py? That's an incorrect expectation;
even though there is now a C implementation of OrderedDict, the Python
implementation will be kept
Emanuel Barry added the comment:
I guess I misexplained myself; I meant that the file hints that there is no C
implementation of it (it doesn't import the name from _collections), even
though '_collections.OrderedDict is collections.OrderedDict'.
--
Roundup Robot added the comment:
New changeset 8644744f53ce by Serhiy Storchaka in branch '3.4':
Added regression test for issue24581.
https://hg.python.org/cpython/rev/8644744f53ce
New changeset cfb84be6c7fc by Serhiy Storchaka in branch '2.7':
Added regression test for issue24581.
Serhiy Storchaka added the comment:
LGTM for 3.4.
But 3.5 has other bug. Changeset 637e197be547 looks incorrect to me. key should
be increfed before calling PyObject_RichCompareBool() for the same reason as
startkey.
--
___
Python tracker
Raymond Hettinger added the comment:
Can you produce a test case?
Perhaps the incref/decref pair ought to be moved into
PyObject_RichCompareBool(). It doesn't make much sense for the callers to do
the work.
--
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: Crash when source set is changed during merging - set.update(): Crash
when source set is changed during merging
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24583
Serhiy Storchaka added the comment:
Thanks.
--
stage: needs patch - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24581
___
___
Changes by Matthieu Gautier d...@mgautier.fr:
--
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Erik Bray added the comment:
For what it's worth (since it was mentioned toward the end of this thread as an
offending package) Astropy has a patch now to fix its misbehavior with respect
to this issue.
I do feel like this would be nice to fix though, since I think it's awkward to
have code
Serhiy Storchaka added the comment:
LGTM for 3.5.
But 3.6 has other bug. Changeset 637e197be547 looks incorrect to me. key should
be increfed before calling PyObject_RichCompareBool() for the same reason as
startkey.
--
___
Python tracker
Changes by Zachary Ware zachary.w...@gmail.com:
--
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24551
___
___
Python-bugs-list
Changes by Zachary Ware zachary.w...@gmail.com:
--
components: -Demos and Tools
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24551
___
___
Roundup Robot added the comment:
New changeset 8e18d615988e by Steve Dower in branch '3.5':
Issue #24585: Enables build-to-build upgrades that preserve settings.
https://hg.python.org/cpython/rev/8e18d615988e
New changeset 2a8a39640aa2 by Steve Dower in branch 'default':
Issue #24585: Enables
Steven D'Aprano added the comment:
I'm sorry, but I believe that you have misunderstood what happens here.
This has nothing to do with the hex codec, or int.to_bytes() etc. This
is the standard property of byte strings in Python, that they are
displayed using ASCII as much as possible.
The
Serhiy Storchaka added the comment:
The same test is crashed in 3.6 even with index_to_entry.diff.
./python -m test.regrtest -F -m test_merge_and_mutate test_set
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24583
Steve Dower added the comment:
Doesn't touch anything significant outside the installer, so I just committed
it. Feel free to read over the change and comment here if you want, but we
unfortunately won't get complete testing of this until rc1.
I added some helpers for faking out version
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24157
___
___
Python-bugs-list
New submission from JohnLeitch:
The msilib.OpenDatabase method suffers from a type confusion vulnerability
caused by the behavior of MsiOpenDatabase(), the underlying win32 function
utilized. This is due to the unorthodox handling of the szPersist parameter:
when an MSIDBOPEN_* value is
JohnLeitch added the comment:
Attaching repro file.
--
Added file:
http://bugs.python.org/file39886/msilib.OpenDatabase_Type_Confusion.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24594
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg246469
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24583
___
R. David Murray added the comment:
Only one question, about a possible missing test. Otherwise this looks good to
me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15014
___
R. David Murray added the comment:
The import is not at the top of the file, it is after the definition.
--
nosy: +r.david.murray
resolution: - not a bug
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
Ethan Furman added the comment:
The error in the example code was in
def __init__(self):
self.data = ...
In order to get around that issue, either `data` needs to be declared at class
scope, or special cased in __getattr__.
--
nosy: +ethan.furman
resolution: - not a bug
41 matches
Mail list logo