[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited

2021-10-20 Thread Tomer Vromen


Tomer Vromen  added the comment:

Just wanted to add that I encountered this today, went to file a ticket, and 
found this one. I'm fine with either style of documentation.

--
nosy: +tomerv

___
Python tracker 
<https://bugs.python.org/issue41698>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43713] sorted() signature is not accurate in the documentation

2021-04-03 Thread Tomer Kalish


New submission from Tomer Kalish :

According to the docs, the sorted function's signature is:
sorted(iterable, *, key=None, reverse=False)
But when printing its help interactively, the signature is:
sorted(iterable, /, *, key=None, reverse=False)
The latter seems to be the correct one, as calling sorted(iterable=arr) will 
raise a TypeError.

The signature in the docs should be fixed.

--
assignee: docs@python
components: Documentation
messages: 390122
nosy: docs@python, tomer.kalish91
priority: normal
severity: normal
status: open
title: sorted() signature is not accurate in the documentation
type: resource usage
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43713>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37831] bool(~True) == True

2019-08-12 Thread Tomer Vromen


New submission from Tomer Vromen :

Bitwise operators have inconsistent behavior when acting on bool values: 
(Python 3.7.4)

# "&" works like "and"
>>> True & True
True
>>> True & False
False
>>> False & False
False

# "|" works like "or"
>>> True | True
True
>>> True | False
True
>>> False | False
False

# "~" does not work like "not"!
>>> ~True
-2
>>> ~False
-1

The result of this is the a user might start working with "&" and "|" on bool 
values (for whatever reason) and it will work as expected. But then, when 
adding "~" to the mix, things start to break.

The proposal is to make "~" act like "not" on bool values, i.e. ~True will be 
False; ~False will be True.

I'm not sure if this has any negative impact on existing code. I don't expect 
any, but you can never know. If there is no objection to this change, I can 
even try to implement it myself an submit a patch.

--
components: Interpreter Core
messages: 349452
nosy: tomerv
priority: normal
severity: normal
status: open
title: bool(~True) == True
type: enhancement
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue37831>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36913] Missing documentation for decorators

2019-05-14 Thread Tomer Vromen


Tomer Vromen  added the comment:

Thank you for the quick response.

Are PEPs considered de-facto documentation for language features? For example, 
string formatting was described in PEP 3101, but still has sections in the 
documentation dedicated to it. I believe that decorators should get a similar 
treatment :-)

I also think that describing decorators as part of the grammar definition is 
lacking. Why is there a whole chapter for Errors and Exceptions and it's not 
only discussed under the grammar definition for raise?

Decorators are a pretty unique (and cool!) feature of Python, and therefore new 
learners of the language need a better reference for learning about them.

I realize that this is a big request, as you would need some expert to write 
this documentation.

--

___
Python tracker 
<https://bugs.python.org/issue36913>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36913] Missing documentation for decorators

2019-05-14 Thread Tomer Vromen


New submission from Tomer Vromen :

The documentation for decorators (for methods and classes) is pretty lacking.

Searching for "decorator" ( https://docs.python.org/3/search.html?q=decorator ) 
brings up a lot of libraries that use decorators, but no documentation 
explaining what they are and how they work. The documentation should have a 
dedicated page for explaining decorators, and this should be the 1st search 
result.

--

In the meantime, then search should give as a 1st result a link to the 
definition of decorator in the glossary: 
https://docs.python.org/3.7/glossary.html#glossary

Actually, it seems that there is no way to directly link to a paragraph in the 
glossary - so that should be added as well.

In general, it would be nice if a search for some term X would show as a 1st 
result the definition of X in the glossary (if it exists there).

Thanks!

--
assignee: docs@python
components: Documentation
messages: 342435
nosy: docs@python, tomerv
priority: normal
severity: normal
status: open
title: Missing documentation for decorators
type: enhancement
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue36913>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34439] Expose venv --prompt value to an environment value

2018-08-20 Thread Tomer Keren


New submission from Tomer Keren :

In the same way the $VIRTUAL_ENV variable tells the virtual environment 
directory, A variable such as $VENV_NAME or $VENV_PROMPT should tell the value 
given to the venv `--prompt` option (Introduced in Issue22829).

An individual could override the EnvBuilder class like the docs say, but that 
wouldn't insure any user will have the variable set. This is crucial for usage 
in custom libraries that want to display the given prompt.

--
components: Library (Lib)
messages: 323782
nosy: Tomer
priority: normal
severity: normal
status: open
title: Expose venv --prompt value to an environment value
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue34439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24160] Pdb sometimes crashes when trying to remove a breakpoint defined in a different debugger sessoon

2017-04-18 Thread Tomer Chachamu

Changes by Tomer Chachamu <to...@festicket.com>:


--
nosy: +Tomer Chachamu

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24160>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25656] multiprocessing.dummy: pool.map hangs on empty list

2015-11-19 Thread Tomer

Changes by Tomer <tomer.mend...@avg.com>:


--
nosy: +jnoller, sbt

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25656>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25656] multiprocessing.dummy: pool.map hangs on empty list

2015-11-18 Thread Tomer

New submission from Tomer:

Hi,
In multiprocessing.dummy module I noticed when you send a zero-length iterator 
to pool.map it hang forever,

Code example:

import urllib2 
from multiprocessing.dummy import Pool as ThreadPool

def start_multithreading_urlopen(threads_num):

pool = ThreadPool(threads_num)
results = pool.map(urllib2.urlopen, [])
pool.close() 
pool.join()

# hang here

print results

I think it related to Issue6433 that was fixed on multiprocessing module with 
simple length check

--
components: Library (Lib)
messages: 254844
nosy: tomer70
priority: normal
severity: normal
status: open
title: multiprocessing.dummy: pool.map hangs on empty list
type: behavior
versions: Python 2.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25656>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18225] ctypes Structure data size is incorrect

2013-06-15 Thread Tomer Levi

New submission from Tomer Levi:

Whenever you create a ctypes.Structure with mixed ctypes, the size of all 
components is calculated by the size of largest one. This is especially 
irritating when trying to use Structure on bytearray.
The problem repeated for me in Python2.6 and 2.7 (both 32bit and 64bit 
versions) [My computer is 64bit]

Example:
#Creating a Structure that should take up 5 bytes
class Test(ctypes.Structure):
_fields_ = [(test, ctypes.c_byte),
(test2, ctypes.c_uint32),]

#Initiating the Structure
Test.from_buffer(bytearray(5))

--- OUTPUT 

Traceback (most recent call last):

  File ipython-input-45-cd4b7501baee, line 1, in module
Test.from_buffer(bytearray(5))

ValueError: Buffer size too small (5 instead of at least 8 bytes)

--
components: ctypes
messages: 191213
nosy: Tomer.Levi
priority: normal
severity: normal
status: open
title: ctypes Structure data size is incorrect
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18225
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com