New submission from the mulhern:
As well as the append action it would be convenient for there to be an extend
action.
This is kind of useful to allow something like:
parser.add_argument(--foo, action=extend, nargs=+, type=str)
given
parser.parse_args(--foo f1 --foo f2 f3 f4.split
New submission from the mulhern:
def decorator(f):
... @functools.wraps(f)
... def new_func(self, junk):
... stack = inspect.stack()
... for i, frame in enumerate(stack):
... print(%s % frame[3])
... f(self, junk)
... return
New submission from the mulhern:
You can run python -m unittest discover some args and the unittests
discovered by discover will be run. This is nice.
However, it is actually desirable to run each unittest package individually,
rather than in the same interpreter instance. When run via
the mulhern added the comment:
I feel that I worded this in a way that makes it look like I'm asking for an
enhancement, not reporting a bug, so I'll try again.
The documentation for 2.7.6 and 3.4.0 says:
Using this decorator requires that the class’s metaclass is ABCMeta or is
derived from
the mulhern added the comment:
Thanks for the fix.
When you say having repr raise is a pretty unusual occurrence you probably
mean having repr raise should be a pretty unusual occurrence.
I think its more usual than you realize and the regression in 3.4 will have
consequences
the mulhern added the comment:
Yes, I really misinterpreted what I saw.
So glad it's a bug anyway and I'm not just wasting your time ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20918
New submission from the mulhern:
Here's my illustrating trace:
Python 3.3.2 (default, Aug 23 2013, 19:00:04)
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux
Type help, copyright, credits or license for more information.
class Junk():
... def __repr__(self):
... raise
the mulhern added the comment:
Thanks, I'ld definitely be _much_ happier w/ a TypeError than with silent
success.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20145
New submission from the mulhern:
Hi!
Here is a simple class hierarchy:
import abc
class META(object):
... __metaclass__ = abc.ABCMeta
... @abc.abstractmethod
... def _junk(self):
... pass
...
class Sub(META):
... def _junk(self, other):
... pass
New submission from the mulhern:
The problems is that it is quite possible to define a property using @property
in a class and then later to realize that it really ought to be a class method,
not an instance method. But then, if you change it to a class method, using
@classmethod annotation
the mulhern added the comment:
Yes. I'ld check if it was a string or a regex object...there is already code
that converts the string to a regular expression in there.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20145
New submission from the mulhern:
A normal thing for a developer to do is to convert a use of an assert* function
to a use of an assert*Regex function and foolishly forget to actually specify
the expected regular expression.
If they do this, the test will always pass because the callable
12 matches
Mail list logo