~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to HACKING

Merge in :
  * bzrlib.osutils.safe_unicode now exists to provide parameter coercion
    for functions that need unicode strings. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
callers will at least get an AttributeError rather than weird results.
78
78
 
79
79
 
 
80
Standard parameter types
 
81
------------------------
 
82
 
 
83
There are some common requirements in the library: some parameters need to be
 
84
unicode safe, some need byte strings, and so on. At the moment we have
 
85
only codified one specific pattern: Parameters that need to be unicode
 
86
should be check via 'bzrlib.osutils.safe_unicode'. This will coerce the
 
87
input into unicode in a consistent fashion, allowing trivial strings to be
 
88
used for programmer convenience, but not performing unpredictably in the
 
89
presence of different locales.
 
90
 
80
91
Documentation
81
92
=============
82
93