On Nov 10, 7:47 am, RyanN wrote:
> Thank you both, I knew there had to be a good way of doing this.
>
> -Ryan
Just an update. I used dictionaries to hold objects and their names.
I'm beginning to understand better. Now to apply this to my actual
problem. Here's the code I ended up with:
class con
On Nov 10, 10:37 am, RyanN <[EMAIL PROTECTED]> wrote:
> On Nov 10, 7:47 am, RyanN wrote:
>
> > Thank you both, I knew there had to be a good way of doing this.
>
> > -Ryan
>
> Just an update. I used dictionaries to hold objects and their names.
> I'm beginning to understand better. Now to apply th
Thank you both, I knew there had to be a good way of doing this.
-Ryan
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 4:23 pm, RyanN <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to teach myself OOP to do a data project involving
> hierarchical data structures.
>
> I've come up with an analogy for testing involving objects for
> continents, countries, and states where each object contains some
> att
On Fri, Nov 7, 2008 at 2:23 PM, RyanN <[EMAIL PROTECTED]> wrote:
>
> to do this I tried:
>
>def addCountry(self,country_name):
># create an instance of country
>exec(country_name + "= country('" + country_name + "')")
># Add this new instance of a country to a list
>