[issue43635] Documentation needs to declare CalledProcessError as potentially resulting from subprocess.run()

2021-03-26 Thread Jennie
New submission from Jennie : The documentation for subprocess says that run() can return CalledProcessError... https://docs.python.org/3/library/subprocess.html#subprocess.run ...but when you click on the link (5th paragraph down) for CalledProcessError, it only lists check_call

Method default argument whose type is the class not yet defined

2012-11-10 Thread Jennie
) ... p = Point() p.distance(Point(3, 4)) 5.0 Is there a better solution? -- Jennie -- http://mail.python.org/mailman/listinfo/python-list

Re: Method default argument whose type is the class not yet defined

2012-11-10 Thread Jennie
On 11/10/2012 09:29 PM, Terry Reedy wrote: On 11/10/2012 2:33 PM, Jennie wrote: I propose three solutions. The first one: class Point: ... def __init__(self, x=0, y=0): ... self.x = x ... self.y = y ... def __sub__(self, other): ... return Point(self.x

How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
'] ... Foo.__dir__() ['python'] dir(Foo) ['__class__', '__delattr__', '__dict__', ...] Can someone tell me where is the problem? Thanks a lot in advance -- Jennie -- http://mail.python.org/mailman/listinfo/python-list

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
not work (Python 3.3): class Foo: ... class __metaclass__(type): ... def __dir__(self): return [python] ... dir(Foo) ['__class__', '__delattr__', '__dict__', '__dir__', ...] Regards, -- Jennie -- http://mail.python.org/mailman/listinfo/python-list

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
On 10/20/2012 11:43 AM, Peter Otten wrote: In Python 3 the way to specify the metaclass has changed: class FooType(type): ... def __dir__(self): return [python] ... class Foo(metaclass=FooType): ... pass ... dir(Foo) ['python'] Thanks! :) -- Jennie -- http://mail.python.org