Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'class,': 0.07; 'currently,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'wrote': 0.14; 'filename.': 0.16; 'limit.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:OOP': 0.16; 'do.': 0.18; 'module': 0.19; 'file,': 0.19; 'file.': 0.24; 'source': 0.25; 'define': 0.26; 'header:X-Complaints-To:1': 0.27; 'lines': 0.31; 'apparently': 0.31; 'though.': 0.31; 'file': 0.32; 'class': 0.32; 'there.': 0.32; 'probably': 0.32; 'subject:from': 0.34; 'problem': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'subject:one': 0.36; "i'll": 0.36; 'to:addr:python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'lower': 0.61; 'email addr:gmail.com': 0.63; 'name': 0.63; 'happen': 0.63; 'size.': 0.65; 'between': 0.67; 'limit': 0.70; 'single,': 0.84; 'subject:Moving': 0.84; 'subject::': 0.85; 'mistake': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re:Moving to an OOP model from an classically imperitive one Date: Wed, 23 Apr 2014 22:01:34 -0400 (EDT) Organization: news.gmane.org References: <80a82415-fc67-4ccf-8827-27a0ba5459b7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: dpc6744195189.direcpc.com X-Newsreader: PiaoHong.NewsGroup.Client.VIP:1.52 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398304549 news.xs4all.nl 2829 [2001:888:2000:d::a6]:48996 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70565 tim.thelion@gmail.com Wrote in message: > I don't really understand your problem or your examples, but others apparently do. So I'll just make a few comments. > > There is one problem though. Currently, I have these functions logically organized into source files, each between 40 and 170 LOC. I fear that if I were to put all of these functions into one class, than I would have a single, very large source file. I don't like working with large source files for practicall reasons. Definitely limit your source file size. 10k lines is probably a good limit. > If I am to define the class SubuserProgram in the file SubuserProgram.py, That's a big mistake right there. Never let the module name match the class name. If you really only happen to have a single class in the file, then just use lower case for the filename. -- DaveA