Re: Distributing methods of a class across multiple files

2012-01-26 Thread Chris Angelico
On Fri, Jan 27, 2012 at 1:11 AM, Roy Smith wrote: > So, I'd say the driving principle should be that a function should do > one thing.  Every function should have an elevator talk.  You should be > able to get on an elevator with a function and when you ask it, "So, > what do you do?", it should b

Re: Distributing methods of a class across multiple files

2012-01-26 Thread Roy Smith
In article , Dennis Lee Bieber wrote: > The old convention I'd learned was to keep functions down to a > (printer) page (classical 6 lines per inch, 11" high, tractor feed -- so > about 60 lines per function -- possibly extend to a second page if > really needed. The generalization of tha

Re: Distributing methods of a class across multiple files

2012-01-26 Thread Chris Angelico
On Thu, Jan 26, 2012 at 2:19 AM, lh wrote: > Third, length. Well 5000 lines eh... I'm nowhere near that guess I can > stick with one file. Of all the source files I have at work, the largest is about that, 5K lines. It gets a little annoying at times (rapid deployment requires GCC to do its magic

Re: Distributing methods of a class across multiple files

2012-01-25 Thread Neil Cerutti
On 2012-01-25, lh wrote: > First, thanks for all the thoughtful replies. I am grateful. > Second, I figured I'd get a lot of judgement about how I really > shouldn't be doing this. Should have pre-empted it :-) oh well. > There is a place IMHO for filename as another structuring > element to help

Re: Distributing methods of a class across multiple files

2012-01-25 Thread lh
First, thanks for all the thoughtful replies. I am grateful. Second, I figured I'd get a lot of judgement about how I really shouldn't be doing this. Should have pre-empted it :-) oh well. There is a place IMHO for filename as another structuring element to help humans in search. Also it can be con

Re: Distributing methods of a class across multiple files

2012-01-25 Thread Jean-Michel Pichavant
lh wrote: Is this possible please? I have done some searching but it is hard to narrow down Google searches to this question. What I would like to do is, for example: 1) define a class Foo in file test.py... give it some methods 2) define a file test2.py which contains a set of methods that are

Re: Distributing methods of a class across multiple files

2012-01-25 Thread Steven D'Aprano
On Tue, 24 Jan 2012 19:54:24 -0800, lh wrote: > Is this possible please? I have done some searching but it is hard to > narrow down Google searches to this question. What I would like to do > is, for example: > 1) define a class Foo in file test.py... give it some methods > 2) define a file test

Re: Distributing methods of a class across multiple files

2012-01-25 Thread Frank Millman
"lh" wrote: > Is this possible please? I have done some searching but it is hard to > narrow down Google searches to this question. What I would like to do > is, for example: > 1) define a class Foo in file test.py... give it some methods > 2) define a file test2.py which contains a set of metho

Re: Distributing methods of a class across multiple files

2012-01-24 Thread Cameron Simpson
On 24Jan2012 19:54, lh wrote: | Is this possible please? I have done some searching but it is hard to | narrow down Google searches to this question. What I would like to do | is, for example: | 1) define a class Foo in file test.py... give it some methods | 2) define a file test2.py which contai

Re: Distributing methods of a class across multiple files

2012-01-24 Thread Roy Smith
In article <569a94a3-cd84-449b-b0c1-80348014a...@i10g2000pbl.googlegroups.com>, lh wrote: > Is this possible please? I have done some searching but it is hard to > narrow down Google searches to this question. What I would like to do > is, for example: > 1) define a class Foo in file test.py..

Distributing methods of a class across multiple files

2012-01-24 Thread lh
Is this possible please? I have done some searching but it is hard to narrow down Google searches to this question. What I would like to do is, for example: 1) define a class Foo in file test.py... give it some methods 2) define a file test2.py which contains a set of methods that are methods of c