Proposal: Inline Import

bruno at modulix onurb at xiludom.gro
Mon Dec 12 14:31:26 CET 2005


Mike Meyer wrote:
> Shane Hathaway <shane at hathawaymix.org> writes:
> 
(snip)
> 
>>What's really got me down is the level of effort required to move code
>>between modules.  After I cut 100 lines from a 500 line module and
>>paste them to a different 500 line module, I have to examine every
>>import in both modules as well as examine the code I moved for missing
>>imports.
> 
> 
> Has it ever occured to you that if you're cutting and pasting 500 line
> blocks, you're doing something fundamentally wrong? One of the points
> of modules and OO is that you don't *have* to do things like
> that. Cut-n-paste means you wind up with two copies of the code to
> maintain, 

Mike, has it ever occured to you that this could be refactoring, not
copy_paste ?-)

(for the record, I too frequently *move* - not 'copy_paste' - big chunks
of code,  at least at the beginning of a project, or before a major
evolution)

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list