[triangle-zpug] static list in python
Josh Johnson
josh_johnson at unc.edu
Fri Mar 14 17:14:01 UTC 2008
Thanks for posting the link, Brad. :)
I initially signed up when I was learning, but I keep an eye on the list
even as I've gotten better with python... it's a pretty high-volume
list, fast response to most questions. There's an emphasis on answering
questions regardless of how elementary they may seem.
I've leaned a lot through the tribulations of others, helps me "think in
python".. so much becomes apparent when 10 people explain a problem from
5 different perspectives :)
JJ
Brad Oaks wrote:
> Thanks Josh,
>
> I didn't know about the tutor list.
> http://mail.python.org/mailman/listinfo/tutor is the url for that list.
>
> --bradoaks
>
> On Fri, Mar 14, 2008 at 12:39 PM, Josh Johnson <josh_johnson at unc.edu> wrote:
>
>> I guess a global isn't so bad, it's only really global to your package.
>> There has to be some definitive answer. You might want to pose your
>> question to the python tutor mailing list.
>>
>>
>> JJ
>>
>> Joseph Mack NA3T wrote:
>>
>>
>>> On Fri, 14 Mar 2008, Josh Johnson wrote:
>>>
>> >
>> >> I recall two meanings for static in programming. Static can mean a
>> >> persistent value, like an internal counter in a list (I think that's
>> >> what you want),
>> >
>> > yes
>> >
>> >> but I've also heard the term mean "a class method that
>> >> is accessed like a library instead of an instance method".
>> >
>> > sorry, forgot about this (I guess "static" is overloaded).
>> >
>> >> I'm not sure if python supports the sort of persistent variable I think
>> >> you want (anybody else know?). If not, you may have to start with a list
>> >> and have that list be returned by your function and then subsequently
>> >> passed to it again:
>> >
>> > This doesn't seem a whole lot different to just having l being global,
>> > which is what I'm doing for the moment.
>> >
>> > Thanks Joe
>> >
>>
>>
>>
>>
>> _______________________________________________
>> triangle-zpug mailing list
>> triangle-zpug at starship.python.net
>> http://starship.python.net/mailman/listinfo/triangle-zpug
>>
>>
More information about the triangle-zpug
mailing list