Showing posts with label best practice. Show all posts
Showing posts with label best practice. Show all posts
Aug 24, 2012
Jun 20, 2012
Multiple Inheritance Best Practices
Multiple inheritance should be avoided: It can be replaced with some
design patterns.
design patterns.
- super usage has to be consistent: In a class hierarchy, super should be used everywhere or nowhere. Mixing super and classic calls is a confusing practice. People tend to avoid super, for their code to be more explicit.
- Don't mix old-style and new-style classes: Having a code base with both results in a varying MRO behavior.
- Class hierarchy has to be looked over when a parent class is called: To avoid any problems, every time a parent class is called, a quick glance at the involved MRO (with __mro__) has to be done.
Dec 23, 2011
Requests: HTTP for Humans
Очень юзабельное приложение http://docs.python-requests.org/en/latest/index.html
И не менее красивый код https://github.com/kennethreitz/requests/blob/develop/requests/ Есть чему поучиться
И не менее красивый код https://github.com/kennethreitz/requests/blob/develop/requests/ Есть чему поучиться
Labels:
app,
best practice,
codding style
Nov 10, 2011
Django and Python Coding Style and Best Practices
Introduction:
The Zen of Python (PEP 20)
Follow guide lines:
Style Guide for Python Code (PEP 8)
Django coding style
Google Python Style Guide (RU)
Tutorials:
Django best practices fork of Django Reusable App Conventions
Django Design Patterns
Django Advice
The Hitchhiker’s Guide to Python!
Python Project Howto
Code Like a Pythonista: Idiomatic Python
Nick Coghlan’s Python Notes
A Guide to Python's Magic Methods
Code checkers:
django-lint Online
Learn by examples:
Rosettacode code and algorithms examples
Be aware of
Python Standard Library: A Few of My Favorite (Python) Things
Design patterns
http://www.pypedia.com/index.php/Main_Page
Thoughts on RESTful API Design
The Zen of Python (PEP 20)
Follow guide lines:
Style Guide for Python Code (PEP 8)
Django coding style
Google Python Style Guide (RU)
Tutorials:
Django best practices fork of Django Reusable App Conventions
Django Design Patterns
Django Advice
The Hitchhiker’s Guide to Python!
Python Project Howto
Code Like a Pythonista: Idiomatic Python
Nick Coghlan’s Python Notes
A Guide to Python's Magic Methods
Code checkers:
django-lint Online
Learn by examples:
Rosettacode code and algorithms examples
Be aware of
Python Standard Library: A Few of My Favorite (Python) Things
Design patterns
http://www.pypedia.com/index.php/Main_Page
Thoughts on RESTful API Design
Labels:
best practice,
codding style,
design patterns
Subscribe to:
Comments (Atom)