On Feb 17, 10:17 am, Matthew Marshall <[EMAIL PROTECTED]>
wrote:
> Dan Bishop wrote:
> > I will say, however, that hasattr(item, '__iter__') isn't a perfect
> > way of checking whether an object is iterable: Objects that just
> > define __getitem__ are iterable too (e.g., UserList).
>
> Speaking of
Dan Bishop wrote:
> I will say, however, that hasattr(item, '__iter__') isn't a perfect
> way of checking whether an object is iterable: Objects that just
> define __getitem__ are iterable too (e.g., UserList).
Speaking of which, what *is* the best way to check if an object is
iterable?
I always
On Feb 8, 7:30 pm, Zack <[EMAIL PROTECTED]> wrote:
>[snip]
>
> The generators you show here are interesting, and it prodded me on how
> to add tuples but at the moment (I'm a python newbie) the generator
> seems less readable to me than the alternative. After some input from
> Scott David Daniels I
On Feb 17, 4:42 pm, TerryP <[EMAIL PROTECTED]> wrote:
> Tomek Paczkowski wrote:
> > You can try to put your code through pylint. It will give you some
> > automatic critique.
>
> There is a pylint !?
>
> That one is defiantly making my workstation later just for fun hehe.
>
See if you can find an
Tomek Paczkowski wrote:
> You can try to put your code through pylint. It will give you some
> automatic critique.
>
There is a pylint !?
That one is defiantly making my workstation later just for fun hehe.
--
There seems no plan because it is all plan.
-- C.S. Lewis
--
http:/
On Feb 8, 4:32 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Feb 8, 3:40 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>
>
>
> > How about:
>
> > from itertools import count
> > from random import randrange
>
> > def grow(L, depth, counter=count()):
> >'''grow L by appending integers and
On Feb 8, 3:40 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On Feb 8, 7:20 pm, "Zack" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all. I'm just starting to pick up python. I wanted to play with nested
> > lists so first I wrote a little bit of code to create arbitrarily nested
> > lists (grow). T
Zack wrote:
> Hi all. I'm just starting to pick up python. I wanted to play with nested
> lists so first I wrote a little bit of code to create arbitrarily nested
> lists (grow). Then I wrote a breadth first search. I'm putting this small
> snippet up asking for criticism. Was there a more elegan
On Feb 8, 7:20 pm, "Zack" <[EMAIL PROTECTED]> wrote:
> Hi all. I'm just starting to pick up python. I wanted to play with nested
> lists so first I wrote a little bit of code to create arbitrarily nested
> lists (grow). Then I wrote a breadth first search. I'm putting this small
> snippet up askin
Hi all. I'm just starting to pick up python. I wanted to play with nested
lists so first I wrote a little bit of code to create arbitrarily nested
lists (grow). Then I wrote a breadth first search. I'm putting this small
snippet up asking for criticism. Was there a more elegant way to do what I'm
10 matches
Mail list logo