On Wed, Jul 13, 2011 at 7:46 AM, rantingrick wrote:
[x for x in dir([]) if not x.startswith('_')]
> ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
> 'reverse', 'sort']
>
> Because we have plenty of room for args in this function...
>
dir(verbose=False)
> ['append', 'co
On Jul 1, 12:20 pm, Tim Chase wrote:
> If it came in as an effortless (i.e. O(1) where I do it once and
> never again; not an O(n) where n=the number of times I invoke
> Python) default replacement for dir(), I'd reach for it a lot
> more readily. I seem to recall there's some environment-var or
On Jun 30, 11:29 pm, Steven D'Aprano wrote:
> The dir() function is designed for interactive use, inspecting objects for
> the names of attributes and methods.
>
> Here is an enhanced version that allows you to pass a glob to filter the
> names you see:
meh,
I have always believed in keeping my
Ethan Furman wrote:
Tim Chase wrote:
If it came in as an effortless (i.e. O(1) where I do it once and never
again; not an O(n) where n=the number of times I invoke Python)
default replacement for dir(), I'd reach for it a lot more readily. I
seem to recall there's some environment-var or magi
Tim Chase wrote:
> On 06/30/2011 11:29 PM, Steven D'Aprano wrote:
>> The dir() function is designed for interactive use, inspecting objects
>> for the names of attributes and methods.
>>
>> Here is an enhanced version that allows you to pass a glob to filter the
>> names you see:
>>
>> Comments an
Tim Chase wrote:
If it came in as an effortless (i.e. O(1) where I do it once and never
again; not an O(n) where n=the number of times I invoke Python) default
replacement for dir(), I'd reach for it a lot more readily. I seem to
recall there's some environment-var or magic file-name that gets
On 06/30/2011 11:29 PM, Steven D'Aprano wrote:
The dir() function is designed for interactive use, inspecting objects for
the names of attributes and methods.
Here is an enhanced version that allows you to pass a glob to filter the
names you see:
Comments and improvements welcome.
Having not