#5538 HIGH Retriag: Every python activity emits errors when starting.

Zarro Boogs per Child bugtracker at laptop.org
Fri Dec 21 04:56:36 EST 2007


#5538: Every python activity emits errors when starting.
---------------------+------------------------------------------------------
  Reporter:  cscott  |       Owner:  marco            
      Type:  defect  |      Status:  new              
  Priority:  high    |   Milestone:  Retriage, Please!
 Component:  sugar   |     Version:                   
Resolution:          |    Keywords:  review?          
  Verified:  0       |  
---------------------+------------------------------------------------------

Comment(by tomeu):

 Replying to [comment:10 bernie]:
 > My $.02 on this is that moving imports next to where things are used
 actually _improves_ maintainablity.

 I didn't write the code guidelines, but that point certainly matches my
 development experience. I'm obviously not going to start debating every
 guideline at this point in the game.

 See the link below for the original source for this rule. You can go
 discuss with Guido if you want, but I certainly see a value in staying
 with the coding rules used in most Python projects.

 http://www.python.org/dev/peps/pep-0008/

 > When I see a long run of imports (or #includes in C) at the top of a
 module, I always wonder which ones are really still being used and where.
 Detecting the unused ones for the purpose of dropping becomes increasingly
 hard over time.

 Not true, in python is as trivial as running pylint on that file.

 If a module has so many imports as to confuse readers, then it has too
 many dependencies and is asking for refactoring.

 > So +1 for cscott patch, with or without proof of actual load time
 improvement.

 I don't think is polite to ask the developers who are going to maintain
 that code to break the coding guidelines without giving proofs of why is
 that better.

 To me, it sounds like "Please put this patch in that will make your life
 more difficult but will solve a performance problem that I don't care to
 quantify".

 In fact, that happened in a past milestone. A developer not from the sugar
 team pushed some changes that later broke in a difficult way to debug.
 Measuring is less heroic than proposing changes that dramatically improve
 micro tests, but I don't think it helps users at all.

 I think that putting a couple of log messages printing timestamps would
 have taken less time than discussing this.

-- 
Ticket URL: <http://dev.laptop.org/ticket/5538#comment:11>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list