[Tutor] I am going to change Giant Calculator into mini calculators.

2005-07-17 Thread Nathan Pinno
Hey all,   The subject says it all. If anyone is interested in working on Giant Calculator, give me a shout, and I'll send you a ZIP file with the PY file.   Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tuto

Re: [Tutor] regular expressions

2005-07-17 Thread Danny Yoo
On Sun, 17 Jul 2005, Servando Garcia wrote: > Using regular expressions how do I represent Floats. Hi Servando, I know that you're working on a parser project, but the regex for doing floats is pretty much a homework project. There's not much we can do except point you toward the Regular Expr

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Danny Yoo
> A related question is where's the trade-off between using ``in'' with a > list, and a dictionary? I presume that using it with small hashes will > be faster than dictionries since it doesn't have to calculate the > hashes. Hi Bill, Scanning for an elements in a list is a "linear" operation, in

Re: [Tutor] is there an online exam or coarse i can take to get a certificate

2005-07-17 Thread Danny Yoo
On Sun, 17 Jul 2005, Andreas Kostyrka wrote: > Am Samstag, den 16.07.2005, 19:39 +0500 schrieb Mustafa Abbasi: > > is there an online exam or coarse i can take to get a certificate in > > python. preferrably cheap and online because i live in pakistan and > > online exams are my only hope. > > N

[Tutor] regular expressions

2005-07-17 Thread Servando Garcia
Hello Using regular expressions how do I represent Floats. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT, Tcl & Python

2005-07-17 Thread Danny Yoo
> Tcl is a fun language with a wholeheap of interesting concepts new to > Python programmers. So its definitely worth looking at - and its nearly > always more compact than Python too. Alan Greenspun, author of one of my favorite web-development books "Philip and Alex's Guide to Web Publishing", a

Re: [Tutor] Just finished creating Shape_Calc.

2005-07-17 Thread Nathan Pinno
Luke and all,   Shape_calc helps you to find the area, perimeter, and other info about shapes.   Simple enough. - Original Message - From: luke To: Nathan Pinno Sent: Sunday, July 17, 2005 9:42 PM Subject: Re: [Tutor] Just finished c

[Tutor] newbie help> audio IO + python

2005-07-17 Thread ctrl freq
Hi I've been looking at lots of sites and checked out the docs, but can't find the info I am looking for to be able to detect audio input from my sound card. I want to use input from a mic plugged into my sound card to trigger events via pySerial.. (which has great docs) Any help/advice much apprec

Re: [Tutor] Python Lists

2005-07-17 Thread DaSmith
Thank you Danny, you guessed correctly, problem solved ! Kind Regards, Daniel Smith  -Danny Yoo <[EMAIL PROTECTED]> wrote: -To: [EMAIL PROTECTED]From: Danny Yoo <[EMAIL PROTECTED]>Date: 07/15/2005 10:06PMcc: tutor@python.orgSubject: Re: [Tutor] Python Lists> I have created a class which has

[Tutor] Just finished creating Shape_Calc.

2005-07-17 Thread Nathan Pinno
Hey all,   Just finished shape_calc.py. If anyone is interested in going through the code, before I send it to my website, let me know. If no one answers this within a week, I post the zip file on my site.   Nathan Pinno. ___ Tutor maillist - Tuto

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Kent Johnson
Bill Campbell wrote: > I'm going to be doing some work where I'll be doing existence > testings on keys on about a million records where it may require > multiple passes so I'm a bit concerned about the timing of these > tests. > > Is there any significant performance difference between the > test

Re: [Tutor] OT, Tcl & Python

2005-07-17 Thread ralobao
Why do not do this entirely in Python ? Em Seg, 2005-07-18 às 02:00 +0200, Andreas Kostyrka escreveu: > Am Samstag, den 16.07.2005, 01:19 -0700 schrieb Luis N: > > Hi, > > > > I was wondering if someone knowledgeable of both Tcl and Python could > > suggest whether it would be a good or a bad id

Re: [Tutor] OT, Tcl & Python

2005-07-17 Thread Andreas Kostyrka
Am Samstag, den 16.07.2005, 01:19 -0700 schrieb Luis N: > Hi, > > I was wondering if someone knowledgeable of both Tcl and Python could > suggest whether it would be a good or a bad idea to write a Python/Tk > application, with the motive to rewrite the application in Tcl/Tk once > completed. My r

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Andreas Kostyrka
A short trial with timeit.py shows that k in d is faster than d.has_key(k) k in d is about as fast as hk(d), where hk = d.has_key So it seems both expressions are about the same, but the expression dict.has_key involves an additional dictionary lookup to fetch has_key. Andreas Am Sonntag, den

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Andreas Kostyrka
Am Montag, den 18.07.2005, 00:53 +0200 schrieb Max Noel: > On Jul 17, 2005, at 20:18, Bill Campbell wrote: > > > Is there any significant performance difference between the > > tests, ``key in dictionary'' and ``dictionary.has_key(key)''? > > I would prefer using the ``key in'' because it's a bit

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread André Roberge
Max Noel wrote: > [snip] > > > While we're on that topic, is there a particular reason why 'in', > in a dict context, searches the keys instead of doing the logical thing > and searching the values? animals = { 'cat': "a cuddly little mammal who likes to eat birds", 'dog': "man's best fr

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Max Noel
On Jul 17, 2005, at 20:18, Bill Campbell wrote: Is there any significant performance difference between the tests, ``key in dictionary'' and ``dictionary.has_key(key)''? I would prefer using the ``key in'' because it's a bit easier to type, and can also be used with lists in addition to diction

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread jfouhy
Quoting Bill Campbell <[EMAIL PROTECTED]>: > I'm going to be doing some work where I'll be doing existence > testings on keys on about a million records where it may require > multiple passes so I'm a bit concerned about the timing of these > tests. If you're just doing existence testing, is it a

Re: [Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread R. Alan Monroe
> Is there any significant performance difference between the > tests, ``key in dictionary'' and ``dictionary.has_key(key)''? > I would prefer using the ``key in'' because it's a bit easier to > type, and can also be used with lists in addition to dictionaries. Dunno about speed, but they do disas

[Tutor] Performance difference, ``in'' vs ``has_key()''

2005-07-17 Thread Bill Campbell
I'm going to be doing some work where I'll be doing existence testings on keys on about a million records where it may require multiple passes so I'm a bit concerned about the timing of these tests. Is there any significant performance difference between the tests, ``key in dictionary'' and ``dict

Re: [Tutor] is there an online exam or coarse i can take to get a certificate

2005-07-17 Thread Andreas Kostyrka
Am Samstag, den 16.07.2005, 19:39 +0500 schrieb Mustafa Abbasi: > is there an online exam or coarse i can take to get a certificate in > python. > preferrably cheap and online because i live in pakistan and online > exams are my only hope. Not that I would know. Certification for a programming lan