A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/312302.html below:

Add lists to class?

Add lists to class? Add lists to class?BBands bbands at gmail.com
Fri Sep 2 19:49:01 EDT 2005
> Why don't you use a real list instead?

I am using lists... I just showed the naming schema. Here is how they
are implemented.

for var in range(len(self.symbols)):
    setattr(self, "_" + str(var), [])

> I don't understand what
> self.__dict__["_" + str(var)] gets you.

It let's me access lists that aren't known at write time.

    jab


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4