This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年06月01日 16:33 by Graham Klyne, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg244601 - (view) | Author: Graham Klyne (Graham Klyne) | Date: 2015年06月01日 16:33 | |
conina:~ graham$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> dict({'a':'aa'},b='bb')
{'a': 'aa', 'b': 'bb'}
>>> dict({'a':'aa'},a='bb')
Segmentation fault: 11
conina:~ graham$
From the docs:
[[
If keyword arguments are given, the keyword arguments and their values are added to the dictionary created from the positional argument. If a key being added is already present, the value from the keyword argument replaces the value from the positional argument.
]]
|
|||
| msg244602 - (view) | Author: Graham Klyne (Graham Klyne) | Date: 2015年06月01日 16:36 | |
Oops, (RETURN) submitted before comments done... I think the example interactive python script is self-explanatory. I know my version of Python is a bit out of date, but I couldn't see anything in the issue list that indicated this problem had been seen and fixed. I had previously experienced some segment fault crashes while doing dictionary manipulation, but could not isolate the cause. |
|||
| msg244603 - (view) | Author: Graham Klyne (Graham Klyne) | Date: 2015年06月01日 16:39 | |
I just tried the same on a Python 2.7.5 installation and it worked as expected (no crash). So I now assume this is fixed. Sorry for the noise. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:17 | admin | set | github: 68538 |
| 2015年06月01日 17:03:36 | ned.deily | set | superseder: python.org Interactive interpreter linked with libedit can segfault on future OS X resolution: out of date -> duplicate stage: resolved |
| 2015年06月01日 16:39:57 | Graham Klyne | set | status: open -> closed resolution: out of date messages: + msg244603 |
| 2015年06月01日 16:36:48 | Graham Klyne | set | messages: + msg244602 |
| 2015年06月01日 16:33:07 | Graham Klyne | create | |