Re: [Tutor] Class in a class

2005-02-18 Thread Kent Johnson
Liam Clarke wrote: Hi Kent, So the layering is GUI - user interaction Application functionality CbDao - application-specific database access DbAccess - generic database access, easy to use JDBC connection - raw database access, not so easy to use This sounds a lot like what I'm aiming for in a

Re: [Tutor] Class in a class

2005-02-17 Thread Liam Clarke
Hi Kent, >So the layering is >GUI - user interaction >Application functionality >CbDao - application-specific database access >DbAccess - generic database access, easy to use >JDBC connection - raw database access, not so easy to use This sounds a lot like what I'm aiming for in a project, the

Re: [Tutor] Class in a class

2005-02-17 Thread Alan Gauld
> Does it make sense to do this: That depends on what you are trying to do! If its to make scrambled eggs thewn nope, no sense whatsoever, but if writing a programme storing an instance inside another instance is very common indeed! :-) > In [2]: class AB: >...: pass >...: > In [3

Re: [Tutor] Class in a class

2005-02-17 Thread Kent Johnson
Luis N wrote: Does it make sense to do this: In [2]: class AB: ...: pass ...: In [3]: a = AB() In [4]: a Out[4]: <__main__.AB instance at 0x8428bec> In [5]: class BC: ...: def __init__(self, foo): ...: self.foo = foo In [6]: b = BC(a) In [7]: b.foo Out[7]: <__main__.AB i

[Tutor] Class in a class

2005-02-17 Thread Luis N
Does it make sense to do this: In [2]: class AB: ...: pass ...: In [3]: a = AB() In [4]: a Out[4]: <__main__.AB instance at 0x8428bec> In [5]: class BC: ...: def __init__(self, foo): ...: self.foo = foo In [6]: b = BC(a) In [7]: b.foo Out[7]: <__main__.AB instance a