Yongzhi Pan added the comment:
On macOS with Python 3.7.2, using pitrou's code, I suspect Python does not
delete some semaphores used by Queue.
Run these:
import multiprocessing
import os
import threading
os.system('lsof -p {} | grep -v txt'.format(os.getpid()))
q = multiprocessing.Queue
Change by Yongzhi Pan :
--
nosy: +fossilet
___
Python tracker
<https://bugs.python.org/issue33081>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Yongzhi Pan <panyong...@gmail.com>:
--
nosy: +fossilet
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18018>
___
__
New submission from Yongzhi Pan:
In an empty dir, e.g. Desktop, the following import raises SystemError:
from . import foo
Traceback (most recent call last):
File stdin, line 1, in module
SystemError: Parent module '' not loaded, cannot perform relative import
The documentation says
Yongzhi Pan added the comment:
Or:
In Python, variables inside a function that are only referenced but not
assigned are implicitly global.?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23589
Yongzhi Pan added the comment:
What about changing the first sentence to:
In Python, variables that are only referenced but not assigned inside a
function are implicitly global.?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
New submission from Yongzhi Pan:
In
https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python,
two sentences of essentially the same meaning exist. I try to remove this
redundancy.
--
assignee: docs@python
components: Documentation
Changes by Yongzhi Pan panyong...@gmail.com:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list
Yongzhi Pan added the comment:
Updated diff as Raymond's wording.
--
Added file: http://bugs.python.org/file38340/faq_fix_1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23589
Changes by Yongzhi Pan panyong...@gmail.com:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8350
___
___
Python-bugs-list
Yongzhi Pan added the comment:
Do the patches still have problems?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22379
___
___
Python-bugs-list
Yongzhi Pan added the comment:
I tested it and find str of an exception does not contain the exception type:
a = TypeError()
str(a)
''
a = TypeError('b', 3)
a.args
('b', 3)
str(a)
('b', 3)
Am I missing some other circumstances?
--
___
Python
Yongzhi Pan added the comment:
I have updated the test for 3.5. The related tests pass after the patching. Are
they OK now?
There are two caveats: I did not update test_bytes in 2.7, and I did not add
checkraises in test_bytes in 3.5.
--
Added file: http://bugs.python.org/file36621
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
versions: +Python 3.5
Added file: http://bugs.python.org/file36604/str_join_exception_message_1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22379
Yongzhi Pan added the comment:
I updated the patches. Since exceptions in 3 do not have a message attribute, I
did not check them. Are they OK?
--
Added file: http://bugs.python.org/file36605/test_for_35.diff
___
Python tracker rep
New submission from Yongzhi Pan:
In the 2.7 branch, the exception message of str.join is missing when the
argument is non-sequence:
' '.join(None)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError
I fix this with a patch. After this:
' '.join(None)
Traceback
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14228
___
___
Python-bugs
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18885
___
___
Python-bugs
Yongzhi Pan added the comment:
It may be worth to noting that when creating property attribute using the
property decorator, we may tend to name the method using nouns, like here:
http://docs.python.org/2/library/functions.html#property
This is when I once overided data attribute with method
Yongzhi Pan added the comment:
One possible solution:
We do not list priorities of the operations, instead link to the precedence
table in the language reference.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16438
Yongzhi Pan added the comment:
I updated the patch according to the code review. Hope now it is OK.
--
Added file: http://bugs.python.org/file27995/set_and_dict_comprehensions_1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Yongzhi Pan added the comment:
I think metal means that the different ways set is repr'd in 2.7 and 3.
In 2.7:
In [9]: a = {x for x in 'abracadabra' if x not in 'abc'}
In [10]: repr(a)
Out[10]: set(['r', 'd'])
In 3.2:
In [6]: a = {x for x in 'abracadabra' if x not in 'abc'}
In [7]: repr
Yongzhi Pan added the comment:
Great they are backported to 2.7. Dictionary and set comprehensions are not
documented in the tutorial of 2.7, though they are in the language reference.
Is it OK to add these to the tutorial? I've uploaded a patch.
--
nosy: +fossilet
Added file: http
New submission from Yongzhi Pan:
Dictionary and set comprehensions are backported to 2.7 in issue #2333. The are
not documented in the tutorial of 2.7, though they are in the language
reference. Is it OK to add these to the tutorial? I've uploaded a patch.
--
assignee: docs@python
New submission from Yongzhi Pan:
http://docs.python.org/3/tutorial/whatnow.html
The last paragraph links to http://www.python.org/doc/faq/, which defaults to
Python 2 FAQ.
--
assignee: docs@python
components: Documentation
messages: 175156
nosy: docs@python, fossilet
priority: normal
New submission from Yongzhi Pan:
http://docs.python.org/3/library/functions.html#func-frozenset
http://docs.python.org/3/library/functions.html#func-set
frozenset and set function have no links to their definitions. Also the anchor
name is prefixed with func, which is different to other
New submission from Yongzhi Pan:
http://docs.python.org/3/library/functions.html#issubclass
classinfo may be a tuple of class objects.
I suggest make it clear like isinstance, use something like this:
classinfo may be a tuple of class objects and such tuples.
--
assignee: docs@python
New submission from Yongzhi Pan:
http://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex
All numeric types (except complex) support the following operations, sorted by
ascending priority.
It list '-' after '+', '/' after '*'. That is to mean '-' has higher precedence
New submission from Yongzhi Pan:
http://docs.python.org/3/library/stdtypes.html#str.title
The second snippets is not collapsed correctly.
--
assignee: docs@python
components: Documentation
messages: 175171
nosy: docs@python, fossilet
priority: normal
severity: normal
status: open
title
Yongzhi Pan added the comment:
I mean the text at the first link need fix. '+' and '-' are not on the same
row. And the doc says: sorted by ascending priority, that means they have
ascending priority.
The table in the reference is just right
New submission from Yongzhi Pan:
http://docs.python.org/3/library/stdtypes.html#methods
Attempting to set a method attribute results in a TypeError being raised.
But in the example, if we do c.method.whoami = 'c', we get AttributeError
instead of TypeError.
--
assignee: docs@python
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12634
___
___
Python-bugs
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16048
___
___
Python-bugs
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6829
___
___
Python-bugs
New submission from Yongzhi Pan:
http://docs.python.org/py3k/tutorial/stdlib2.html#weak-references
In the code example, the two class funtions' bodies have indents of 8 spaces.
All other indents in the docs are 4 spaces. I suggest here we use 4 spaces also.
--
assignee: docs@python
New submission from Yongzhi Pan:
http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting
In the last but second code sample in that section, the code is not correctly
colored and cannot be correctly collapsed.
Expanded:
table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab
New submission from Yongzhi Pan:
http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files
The text:
In text mode, the default is to convert platform-specific line endings (\n on
Unix, \r\n on Windows) to just \n on reading and \n back to platform-specific
line endings
Changes by Yongzhi Pan fossi...@users.sourceforge.net:
--
nosy: +fossilet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4749
___
___
Python-bugs
Yongzhi Pan fossi...@users.sourceforge.net added the comment:
I suggest append An empty last part will result in a path that ends with a
separator or something similar to the docstring, though it is already in the
HTML documentation.
Suppose someone does this like me:
In [10]: join('a', sep
39 matches
Mail list logo