New submission from Trey Hunner :
The glossary page allows for anchor links to jump to specific definitions.
For example: https://docs.python.org/3.9/glossary.html#term-lbyl will open the
glossary page with the web browser showing the LBYL at the top of the page.
This no longer works in
Trey Hunner added the comment:
I just realized those only affects some terms.
parameter works: https://docs.python.org/3/glossary.html#term-parameter
And LBYL does work but only if LBYL was used:
https://docs.python.org/3/glossary.html#term-LBYL
The EAFP term does link to #term-LBYL
New submission from Trey Hunner :
While playing around with the main CPython branch against I noticed that
enumerate now gives a strange error message when `iterable` is provided as a
keyword argument:
>>> enumerate(iterable=[])
Traceback (most recent call last):
File "
New submission from Trey Hunner :
When making a dataclass with slots=True and frozen=True, assigning to an
invalid attribute raises a TypeError rather than a FrozenInstanceError:
>>> from dataclasses import dataclass
>>> @dataclass(frozen=True, slots=True)
... class Vector
New submission from Trey Hunner :
On Ubuntu Linux 18.04 when I run Python from within a terminal, control keys
such as Ctrl-L, Ctrl-A, Ctrl-E, and Ctrl-K work as expected.
However, if I type Ctrl-C Escape Enter (^C followed by Esc followed by Return),
control keys stop working as expected
Trey Hunner added the comment:
I got some help investigating via a Twitter thread on this topic:
https://twitter.com/treyhunner/status/1355280273399664642
Here's more context: that combination of keys seems to put readline into vi
mode, though it only does so in Python and not insi
Trey Hunner added the comment:
Thank you Steve and Tadek for confirming that this is a readline feature and
for pointing me to the readline manual. The note about an ~/.inputrc file lead
me to discover (happily) that I could override this behavior by creating a
~/.inputrc file with the
Trey Hunner added the comment:
This is a bug for string comparisons as well. I just had to manually
reimplement assertMultiLineEqual (which doesn't call assertSequenceEqual) on
one of my test classes to workaround this issue.
--
nosy: +trey
versions: +Python 3.7, Python 3.8, P
New submission from Trey Hunner :
The below code worked on Python 3.5, 3.6, 3.7, and 3.8, but it now crashes on
Python 3.9.
from contextlib import contextmanager
@contextmanager
def open_files(names):
yield names # This would actually return file objects
with open_files(['file
Changes by Trey Hunner :
--
pull_requests: +2766
___
Python tracker
<http://bugs.python.org/issue30466>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Trey Hunner:
The tutorial page for classes starts with "Compared with other programming
languages".
While object-oriented programming and classes are popular in many programming
languages, not everyone learning about Python's classes is familiar with the
co
Changes by Trey Hunner :
--
pull_requests: +1887
___
Python tracker
<http://bugs.python.org/issue30466>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Trey Hunner :
It looks like the encode method for UserString incorrectly wraps its return
value in a str call.
```
>>> from collections import UserString
>>> UserString("hello").encode('utf-8') == b'hello'
False
>>>
New submission from Trey Hunner :
I might be misunderstanding the use of the -3 flag, but it seems like cmp() and
__cmp__ should result in warnings being displayed.
--
components: 2to3 (2.x to 3.x conversion tool)
files: caseless.py
messages: 312604
nosy: trey
priority: normal
severity
New submission from Trey Hunner :
>From the itertools documentation:
>https://docs.python.org/3/library/itertools.html?highlight=itertools#itertools.count
> Also, used with zip() to add sequence numbers.
I'm not certain what the goal of the original sentence was, but I think it
Trey Hunner added the comment:
This is a problem I experience occasionally while teaching and while developing
teaching curriculum.
I tend to close problem windows quickly enough to avoid a computer crash in
front of a live audience, but it's still an annoyance to get the REPL state
ba
16 matches
Mail list logo