New submission from Ryan McCampbell :
Until 3.8 the curses window class was not directly available in code, but now
it is available as `_curses.window`. This is not explicitly stated in the
documentation (although it is consistent with how the method signatures are
written). It is useful to
Ryan McCampbell added the comment:
This seems like a pretty straightforward fix. What's holding it up?
--
nosy: +rmccampbell7
___
Python tracker
<https://bugs.python.org/is
New submission from Ryan McCampbell :
In Python 3.6 the following works:
class HexInt(int):
def __repr__(self):
return hex(self)
class MyEnum(HexInt, enum.Enum):
A = 1
B = 2
C = 3
>>> MyEnum.A
However in Python 3.7/8 it instead prints
>>> MyE
New submission from Ryan McCampbell :
The email.contentmanager.set_bytes_content function which handles bytes content
for raw_data_manager fails when passed cte="7bit" with an AttributeError:
'bytes' object has no attribute 'encode'. This is probably not a m
Ryan McCampbell added the comment:
Oops my bad, didn't realize this was already fixed
--
___
Python tracker
<https://bugs.python.org/issue37536>
___
___
Change by Ryan McCampbell :
--
versions: +Python 3.6
___
Python tracker
<https://bugs.python.org/issue37536>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ryan McCampbell :
--
components: +ctypes
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue37536>
___
___
Python-bugs-list mai
New submission from Ryan McCampbell :
The ctypes.create_string_buffer function uses the length of the string to
create the buffer if no size is provided. Since windows wide chars are UTF-16
the buffer may actually need to be larger to store surrogate pairs. This code
crashes on windows
New submission from Ryan McCampbell :
The mimetypes.guess_all_extensions function is defined as:
def guess_all_extensions(self, type, strict=True):
type = type.lower()
extensions = self.types_map_inv[True].get(type, [])
if not strict:
for ext in self.types_map_inv[False
Ryan McCampbell added the comment:
This is how windows looks up commands, as well as the built in "where" command.
(Note that windows doesn't actually distinguish between "executable" files and
just plain old files, so this could be confusing for UNIX users... a tex
New submission from Ryan McCampbell:
On windows, shutil.which does not match the semantics of built-in command
lookup. If you pass the name of a script like foo.py and the PATHEXT variable
doesn't include .py it will search for foo.py.exe, foo.py.bat, foo.py.cmd, etc.
but not foo.py,
Ryan McCampbell added the comment:
Obviously, I meant isinstance(o, Collections.Iterable).
--
___
Python tracker
<http://bugs.python.org/issue22487>
___
___
Pytho
New submission from Ryan McCampbell:
Is there a reason register() doesn't check for abstract methods, like
subclassing does? Would it fail for some builtin classes? It seems that this
would be a better guarantee that, say, something really is iterable when you
check isins
Ryan McCampbell added the comment:
It's not really a particular use case. I was making a function decorator for
automatic type checking using annotations (ironically I discovered later there
is an almost identical example in the PEP for signatures). But I can't think of
any use ca
Ryan McCampbell added the comment:
Copying defaults still doesn't give you var positional/keyword arguments, which
means, you have to explicitly check the parameter type, and then add them in. I
still think it would more useful to have an "official" way of getting all
function
Ryan McCampbell added the comment:
If this is decided against, a partial solution would be to set the "default"
attribute of VAR_POSITIONAL and VAR_KEYWORD args to an empty tuple/dict,
respectively. Then you could get a parameter's value no matter what with
boundargs
New submission from Ryan McCampbell:
I'm not sure if this is really a bug, but it is unexpected behavior. When you
call "bind" on a Python 3.3 signature object, if you omit an optional argument,
the default is not provided in the arguments dict. Similarly, if there is a
&quo
17 matches
Mail list logo