Changes

Jump to navigation Jump to search
no edit summary
Line 28: Line 28:     
Make sure that [[Development Team/API policy|API policy]] rules are respected.
 
Make sure that [[Development Team/API policy|API policy]] rules are respected.
  −
== Debug logs ==
  −
Let the logger do the string formatting instead of doing it ourselves. Use debug("foo %r bar", x) and not logging.debug("foo %r bar" % x).
  −
  −
Advantages:
  −
* It's more robust
  −
* formatting only happens if we actually log something
      
== Code style ==
 
== Code style ==
Line 45: Line 38:     
Python is a very expressive language that allows for different programming models, before using the more exotic features consider readability over compactness and think that we want people to be able to contribute to Sugar without needing to be familiar with the whole Python syntax.
 
Python is a very expressive language that allows for different programming models, before using the more exotic features consider readability over compactness and think that we want people to be able to contribute to Sugar without needing to be familiar with the whole Python syntax.
 +
 +
== Miscellaneous ==
 +
* Use logging.debug('foo %r bar', x) instead of logging.debug('foo %r bar' % x). This is more robust and formatting only happens if we actually log something.
    
== Tools ==
 
== Tools ==
647

edits

Navigation menu