Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19402

Re: Distributing methods of a class across multiple files

From Neil Cerutti <neilc@norwich.edu>
Newsgroups comp.lang.python
Subject Re: Distributing methods of a class across multiple files
Date 2012-01-25 15:42 +0000
Organization Norwich University
Message-ID <9oam75Ff0mU2@mid.individual.net> (permalink)
References <569a94a3-cd84-449b-b0c1-80348014aac6@i10g2000pbl.googlegroups.com> <mailman.5070.1327492214.27778.python-list@python.org> <7c9ae6dd-c175-4376-be70-633785ed9386@iu7g2000pbc.googlegroups.com>

Show all headers | View raw


On 2012-01-25, lh <lhughes42@gmail.com> 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 humans in search. Also it can be convenient to
> have two people who are working on methods for one class that
> have different directions to have different files (even if
> modern tools can handle distinct edits on the same file by
> multiple folks).

Of the three solutions Steven presented, the latter two leave
very strong coupling between the code in your separate files.
This makes working with the files independently impractical.
Stick with mixin classes and pay heed to the Law of Demeter if
you want to de-couple them enough to work on independently.

-- 
Neil Cerutti

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Distributing methods of a class across multiple files lh <lhughes42@gmail.com> - 2012-01-24 19:54 -0800
  Re: Distributing methods of a class across multiple files Roy Smith <roy@panix.com> - 2012-01-24 23:05 -0500
  Re: Distributing methods of a class across multiple files Cameron Simpson <cs@zip.com.au> - 2012-01-25 17:15 +1100
  Re: Distributing methods of a class across multiple files "Frank Millman" <frank@chagford.com> - 2012-01-25 10:26 +0200
  Re: Distributing methods of a class across multiple files Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-25 11:10 +0000
  Re: Distributing methods of a class across multiple files Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-01-25 12:49 +0100
    Re: Distributing methods of a class across multiple files lh <lhughes42@gmail.com> - 2012-01-25 07:19 -0800
      Re: Distributing methods of a class across multiple files Neil Cerutti <neilc@norwich.edu> - 2012-01-25 15:42 +0000
      Re: Distributing methods of a class across multiple files Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-01-25 11:53 -0500
        Re: Distributing methods of a class across multiple files Roy Smith <roy@panix.com> - 2012-01-26 09:11 -0500
          Re: Distributing methods of a class across multiple files Chris Angelico <rosuav@gmail.com> - 2012-01-27 01:41 +1100
      Re: Distributing methods of a class across multiple files Chris Angelico <rosuav@gmail.com> - 2012-01-26 20:25 +1100

csiph-web