Dabo Coding Guidelines

Yes:

if dabo.ui.areYouSure(_("Do you want to save your changes to %s?") % fieldName):

No:

if dabo.ui.areYouSure(_("Do you want to save your changes to %s?" % fieldName)):

In the first example, the localization function received "Do you want to save your changes to %s". In the second, the localization function received "Do you want to save your changes to LastName??", where LastName was string-substituted. This won't work because it is a dynamic string (evaluated at runtime) and the localization function needs a static string to match against.

def someSimpleMethod(self, val):
    """Computes a value and returns it."""
    return val * 17

def someComplexMethod(self, val):
    """This is a very complex method. In order for you to understand
    what it's doing, I need to explain a lot of the steps involved, so
    that's why this docstring is so long.
    """

    <lots of code follows...>