Re: can we change the variables with function

2010-05-09 Thread Abhishek Mishra
Could you also demonstrate with an example as to what kind of effect you're expecting from whatever you've been desiring to do? On Sun, May 9, 2010 at 1:49 PM, gopi krishna wrote: > Hi >can I change the variable in a function using the function > suppose > >>>def a(): > x=20 > can we change t

Re: flattening list

2010-05-09 Thread Abhishek Mishra
thanks for the excercise just figured out this - #!/usr/bin/env python import sys sys.setrecursionlimit(2000) def flatten(l): flattened = [] for i in l: if type(i) == type([]): flattened += flatten(i) else: flattened.append(i) return flattened if __name__=='__main__'

Re: Recursive functions not returning lists as expected

2010-05-03 Thread Abhishek Mishra
Perhaps you forgot a return, thats fundamental to recursion right - funciton returning itself to itself :) Here's a bit modification needed - def recur_trace(x,y): print x,y if not x: return y return recur_trace(x[1:], y + x[:1]) print ( recur_trace([],[1,2,3]) ) print print ( recur_tr

Re: Is it a bug?

2009-09-02 Thread Abhishek Mishra
Oops, missed out that... thanks On Sun, Aug 30, 2009 at 2:25 PM, Jan Kaliszewski wrote: > 30-08-2009 o 06:10:46 Abhishek Mishra wrote: > >> The single quote \' is the culprit. >> When you say  words = ["Hi", "Whats up", "Bye"] and try prin

Re: keyword in package name.

2008-10-19 Thread Abhishek Mishra
nt to import modules from both vendors -- how? > > Ciao, >         Marc 'BlackJack' Rintsch Ah, you have opened my eyes. I should have asked myself before why I did not face such a clash. (because no-one uses this convention!) I guess the way to go is not use the tld, but just

Re: keyword in package name.

2008-10-19 Thread Abhishek Mishra
On Oct 19, 12:11 pm, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Abhishek Mishra wrote: > > Hello Everyone, > > > I have the habit of using domain names (of either the application or > > company) in reverse in package names. > > > for e.g. com.spam.app1 >

keyword in package name.

2008-10-18 Thread Abhishek Mishra
txt Python Keywords: http://www.python.org/doc/2.5.2/ref/keywords.html Regards, Abhishek Mishra -- http://mail.python.org/mailman/listinfo/python-list