efficiency question
Hi, Suppose I write if x in ("abc", "def", "xyz"): doStuff() elif x in ("pqr", "tuv", "123"): doOtherStuff() elif ... etc. When is python building the tuples? Does it need to build the tuple every time it comes through this code? Or do
Re: efficiency question
Fredrik Lundh wrote: > when in doubt, ask the compiler: MTD wrote: > >>> dis.dis(cod) Thanks so much guys! Python just gets cooler every day! David -- http://mail.python.org/mailman/listinfo/python-list