Re: lists and list item matches (ghost wodgame)

2010-09-22 Thread nn
On Sep 21, 6:39 pm, Baba wrote: > Hi > > query level: beginner > > as part of a learning exercise i have written code that: > > a) asks for a single letter input (assumption: only 1 letter wil be > entered) > b) adds that letter to list1 and then goes through list2 and checks: > >     1) if any it

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 22, 6:39 pm, Baba wrote: > On Sep 22, 9:18 pm, Baba wrote: > > > > > On Sep 22, 3:38 pm, nn wrote: > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > Hi > > > > > query level: beginner > > > > > as part of a

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 23, 10:56 am, nn wrote: > On Sep 22, 6:39 pm, Baba wrote: > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > On Sep 22, 3:38 pm, nn wrote: > > > > > On Sep 21, 6:39 pm, Baba wrote: > > > > > > Hi > > > > > >

Re: collections.namedtuple: conflicting instances?

2010-09-23 Thread nn
On Sep 23, 1:40 pm, Chris Rebert wrote: > On Thu, Sep 23, 2010 at 9:28 AM, David A. Barrett > wrote: > > > > >  I've noticed that it's possible to create conflicting instances of the > > collections.namedtuple class: > > >  from collections  import namedtuple as nt > >  IX = nt('X', 'a b') > >  

Re: lists and list item matches (ghost wodgame)

2010-09-23 Thread nn
On Sep 23, 1:25 pm, Baba wrote: > On Sep 23, 4:17 pm, nn wrote: > > > > > On Sep 23, 10:56 am, nn wrote: > > > > On Sep 22, 6:39 pm, Baba wrote: > > > > > On Sep 22, 9:18 pm, Baba wrote: > > > > > > On Sep 22, 3:

Re: lists and list item matches (ghost wodgame)

2010-09-24 Thread nn
On Sep 23, 8:46 pm, Baba wrote: > On Sep 23, 8:13 pm, nn wrote: > > > > > On Sep 23, 1:25 pm, Baba wrote: > > > > On Sep 23, 4:17 pm, nn wrote: > > > > > On Sep 23, 10:56 am, nn wrote: > > > > > > On Sep 22, 6:39

Re: Help with sets

2010-10-05 Thread nn
> Semantic web.  I did get a bit confused in reading about the concept of > sets in python and why you would use them instead of a dictionary for Sets are faster and more convenient to do intersections, unions, differences. They also use less space than dictionaries. Finally they also help conveyi

Re: Many newbie questions regarding python

2010-10-08 Thread nn
On Oct 7, 7:10 pm, Rogério Brito wrote: > Hi there. > > I am used to some languages like C, but I am just a complete newbie with > Python > and, while writing some small snippets, I had encountered some problems, with > which I would sincerely appreciate any help, since I appreciate this language

Re: Question regarding python2.5 migration from windows xp to windows 7

2010-10-14 Thread nn
On Oct 14, 2:37 am, python_tsp wrote: > Hi, > > We have a Python based test framework which is being used in various > projects. > > Our current environment is > Python (ver 2.5.1) > wxPython (wxPython2.8-win32-ansi-2.8.6.0-py25) > pywin32-210.win32-py2.5 > vcredist_x86.exe > pyserial-2.2 > > Our

Re: Why "flat is better than nested"?

2010-10-27 Thread nn
On Oct 25, 4:18 pm, Ethan Furman wrote: > kj wrote: > > In Steve Holden > > writes: > > >>> On Oct 25, 5:07 am, kj wrote: > In "The Zen of Python", one of the "maxims" is "flat is better than > nested"?  Why?  Can anyone give me a concrete example that illustrates > this point?

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread nn
On Oct 28, 12:33 pm, "cbr...@cbrownsystems.com" wrote: > On Oct 28, 9:23 am, John Posner wrote: > > > > > On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: > > > > It's clear but tedious to write: > > > > if 'monday" in days_off or "tuesday" in days_off: > > >      doSomething > > > > I cur

Re: Question about expression evaluation

2010-11-08 Thread nn
On Nov 8, 11:17 am, Scott Gould wrote: > Hi folks, > > This is a head-scratcher to me. I occasionally get this error: > > --- >   File "/var/www/myproj/account/views.py", line 54, in account >     if request.account.is_instructor and request.account.contact and > request.account.contact.relationsh

<    1   2