New submission from Kevin Norris :
pkgutil.get_data()'s documentation[1] says it is a wrapper for
importlib.abc.ResourceLoader.get_data(), but the latter's documentation[2] says
the whole class is deprecated since 3.7.
Please either:
A. Formally deprecate pkgutil.get_data() (a
Kevin Norris added the comment:
There is none. It raises a TypeError. See
https://docs.python.org/3/reference/expressions.html#value-comparisons
--
___
Python tracker
<https://bugs.python.org/issue34
New submission from Kevin Norris :
The 3.x datetime documentation contains the following footnote:
> In other words, date1 < date2 if and only if date1.toordinal() <
> date2.toordinal(). In order to stop comparison from falling back to the
> default scheme of comparing object
New submission from Kevin Norris:
The documentation for __hash__ contains this text:
"The only required property is that objects which compare equal have the same
hash value; it is advised to somehow mix together (e.g. using exclusive or) the
hash values for the components of the object
Kevin Norris added the comment:
>It could be misleading saying “the name of the current package”, because the
>import could be relative to the a higher level parent package if more than one
>dot is specified.
While this is correct, Python still uses __package__ to determine what to
New submission from Kevin Norris:
The tutorial contains this statement:
Note that relative imports are based on the name of the current module. Since
the name of the main module is always "__main__", modules intended for use as
the main module of a Python application must always us
Kevin Norris added the comment:
If I were designing pathlib from scratch, I would not have a separate Path
class. I would instead do something like this:
In pathlib.py:
if os.name == 'nt':
Path = WindowsPath
else:
Path = PosixPath
Alternatively, Path()
Kevin Norris added the comment:
I'm a little concerned about this fix. In particular, if I understand the
design of the patch correctly, it is intended to produce this behavior:
Path('C:/foo').resolve() != Path('//?/C:/foo').resolve()
Since both paths are vali
Kevin Norris added the comment:
When the directory name is '...', the error is different:
>>> pth = pathlib.Path('//?/C:/...')
>>> pth.mkdir()
>>> pth.resolve().rmdir()
Traceback (most recent call last):
File "",
New submission from Kevin Norris:
Run Python as an administrator:
>>> import pathlib
>>> pth = pathlib.Path('//?/C:/foo.')
>>> pth.mkdir()
>>> pth.resolve().rmdir()
Traceback (most recent call last):
File "", l
New submission from Kevin Norris:
Code such as this:
class Foo:
def __str__(self):
# Perhaps this value comes from user input, or
# some other unsafe source
return something_untrusted
def isidentifier(self):
# Perhaps it
11 matches
Mail list logo