Re: Global array in python

2009-09-29 Thread Jean-Michel Pichavant
Rudolf wrote: How can i declare a global array in python? import __builtin__ __builtin__.myList = [] Now you can use myList everywhere in your code. Note that modifying __builtin__ is **not** recommended at all. I don't have time to detail that point, google it if you want the answ

Re: Global array in python

2009-09-29 Thread koranthala
On Sep 29, 5:48 am, Rudolf wrote: > How can i declare a global array in python? As others have mentioned, you do not have concept of declaration. But if you are looking for creating a global variable, it is like any other language. Declare the same in a module, outside any procedures or clas

Re: Global array in python

2009-09-28 Thread Chris Rebert
On Mon, Sep 28, 2009 at 6:55 PM, rantingrick wrote: > On Sep 28, 8:04 pm, Chris Rebert wrote: >> On Mon, Sep 28, 2009 at 5:48 PM, Rudolf wrote: >> > How can i declare a global array in python? >> >> Python has no concept of declarations. >> And it doe

Re: Global array in python

2009-09-28 Thread Olof Bjarnason
2009/9/29 rantingrick : > On Sep 28, 8:04 pm, Chris Rebert wrote: >> On Mon, Sep 28, 2009 at 5:48 PM, Rudolf wrote: >> > How can i declare a global array in python? >> >> Python has no concept of declarations. >> And it doesn't have arrays, it has dynamic

Re: Global array in python

2009-09-28 Thread rantingrick
On Sep 28, 8:04 pm, Chris Rebert wrote: > On Mon, Sep 28, 2009 at 5:48 PM, Rudolf wrote: > > How can i declare a global array in python? > > Python has no concept of declarations. > And it doesn't have arrays, it has dynamically-resizing lists. What version are you us

Re: Global array in python

2009-09-28 Thread Chris Rebert
On Mon, Sep 28, 2009 at 5:48 PM, Rudolf wrote: > How can i declare a global array in python? Python has no concept of declarations. And it doesn't have arrays, it has dynamically-resizing lists. Some examples: one_empty_list = [] a_list_of 5 zeroes = [0]*5 Might I recommend you

Global array in python

2009-09-28 Thread Rudolf
How can i declare a global array in python? -- http://mail.python.org/mailman/listinfo/python-list