Version 8 (modified by Cas, 10 years ago) (diff) |
---|
Coding Styles
Common
- Max line length 119 rather than 79 but ideally keep to 79
Python
Mostly follow PEP8 with the following exceptions:
- Line length (see above)
- All byte arrays (byte strings) should be decoded to strings (unicode strings) on input and encoded back to byte arrays on output. From Stackoverflow:
>>> b"abcde" b'abcde' >>> b"abcde".decode("utf-8") 'abcde'
- All path separators used within code should be converted to posix format /, so should not contain \ or \\. This is to prevent confusion when dealing with cross-platform clients and servers.
Javascript
- Classes should follow the Ext coding style.
- Class names should be in CamelCase
- Instances of classes should use camelCase.