Re: [Python-Dev] Should inspect.getargspec take any callable?

2016-01-16 Thread Nick Coghlan
On 17 January 2016 at 03:23, Andrew Barnert via Python-Dev wrote: > On Jan 16, 2016, at 08:05, Aviv Cohn via Python-Dev > wrote: > > The `getargspec` function in the `inspect` module enforces the input > parameter to be either a method or a function. > > > The `getargspec` already works with clas

Re: [Python-Dev] [Python-ideas] Boolean value of an Enum member

2016-01-16 Thread Ethan Furman
[resending to lists -- sorry, Greg] On 01/15/2016 12:36 PM, Greg Ewing wrote: Ethan Furman wrote: So the question now is: for a standard Enum (meaning no other type besides Enum is involved) should __bool__ look to the value of the Enum member to determine True/False, or should we always be

Re: [Python-Dev] Should inspect.getargspec take any callable?

2016-01-16 Thread Andrew Barnert via Python-Dev
On Jan 16, 2016, at 08:05, Aviv Cohn via Python-Dev wrote: > > The `getargspec` function in the `inspect` module enforces the input > parameter to be either a method or a function. The `getargspec` already works with classes, callable objects, and some builtins. It's also deprecated, in part

[Python-Dev] Should inspect.getargspec take any callable?

2016-01-16 Thread Aviv Cohn via Python-Dev
Hello :)This is my first mail here, I had an idea that I'd like to propose. The `getargspec` function in the `inspect` module enforces the input parameter to be either a method or a function.     def getargspec(func):        """Get the names and default values of a function's arguments.