python Programming Glossary: principle
__lt__ instead of __cmp__ http://stackoverflow.com/questions/1061283/lt-instead-of-cmp have bugs is the code that isn't there whence Python's principle that there ought to be ideally one obvious way to perform a.. ideally one obvious way to perform a task C has the same principle in the Spirit of C section of the ISO standard btw . This doesn't..
Large, persistent DataFrame in pandas http://stackoverflow.com/questions/11622652/large-persistent-dataframe-in-pandas pandas sas known issues share improve this question In principle it shouldn't run out of memory but there are currently memory..
Which is more preferable to use in Python: lambda functions or nested functions ('def')? http://stackoverflow.com/questions/134626/which-is-more-preferable-to-use-in-python-lambda-functions-or-nested-functions even matter If doesn't then does that violate the Pythonic principle śThere should be one ”and preferably only one ”obvious way to do..
Why is Python's “append” not “push”? http://stackoverflow.com/questions/1566266/why-is-pythons-append-not-push no I'm not against this particular one on the basis of any principle . list.push could be added for symmetry with list.pop but I'm..
What do backticks mean to the python interpreter: `num` http://stackoverflow.com/questions/1673071/what-do-backticks-mean-to-the-python-interpreter-num worth it and having both repr and backticks violates the principle śThere should be one and preferably only one obvious way to do..
why does python's list.append evaluate to false? http://stackoverflow.com/questions/1682567/why-does-pythons-list-append-evaluate-to-false a container in place return None an application of the principle of Command query separation . Python's always reasonably pragmatic..
What is a Python egg? http://stackoverflow.com/questions/2051192/what-is-a-python-egg a Python egg and others can be developed. However a key principle of Python eggs is that they should be discoverable and importable...
How to require login for django generic views? http://stackoverflow.com/questions/2140550/how-to-require-login-for-django-generic-views in Django 1.4 and were removed in Django 1.5. But the same principle applies just wrap the view function of the class based view..
Reason for “all” and “any” result on empty lists http://stackoverflow.com/questions/3275058/reason-for-all-and-any-result-on-empty-lists
Why do you have to call .iteritems() when iterating over a dictionary in python? http://stackoverflow.com/questions/3744568/why-do-you-have-to-call-iteritems-when-iterating-over-a-dictionary-in-python were to yield key value tuples in a for loop then by the principle of least astonishment in would also have to take such a tuple..
Whats the best way to start learning django? http://stackoverflow.com/questions/4048973/whats-the-best-way-to-start-learning-django practice it DRY Don't Repeat Yourself is one of the core principles behind Django. If you find yourself copy pasting anything in.. the repitition in creating views thereby following the DRY principle. While it does do that to some extent it also introduces a lot..
Probability distribution in Python http://stackoverflow.com/questions/526255/probability-distribution-in-python in my algo but I can't really know until I try . The basic principle is the more a key is randomly generated often the more unlikely..
How to tell for which object attribute pickle fails? http://stackoverflow.com/questions/569754/how-to-tell-for-which-object-attribute-pickle-fails I am using Python 2.5.2. Even though I understand in principle the root cause of the problem e.g. in the above example having..
FSharp runs my algorithm slower than Python! http://stackoverflow.com/questions/5850243/fsharp-runs-my-algorithm-slower-than-python is that tuples by default use structural comparison so in principle the comparisons done by the Dictionary on the keys are the same..
Start background process/daemon from CGI script http://stackoverflow.com/questions/6024472/start-background-process-daemon-from-cgi-script it shouldn't be done . For CGI anyway. Under the general principle that if something is too hard to accomplish you are probably..
Can 3D OpenGL game written in Python look good and run fast? http://stackoverflow.com/questions/641770/can-3d-opengl-game-written-in-python-look-good-and-run-fast to try it. But there is no reason why it cannot work in principle. At any rate you could still optimize the critical parts either..
Why does python use both reference counting and mark-and-sweep for gc? http://stackoverflow.com/questions/9062209/why-does-python-use-both-reference-counting-and-mark-and-sweep-for-gc C api's and data structures are based heavily round the principle of reference counting. When real garbage collection was added..
sandboxing/running python code line by line http://stackoverflow.com/questions/9670931/sandboxing-running-python-code-line-by-line able to do something like these two are doing Inventing on principle @18 20 Live ClojureScript Game Editor If you don't wanna check.. like Bret Victor's binarySearch example Inventing on principle @18 20 Am I making sense I find it complicated to explain in..
Is there a reason Python strings don't have a string length method? http://stackoverflow.com/questions/237128/is-there-a-reason-python-strings-dont-have-a-string-length-method
Handling race condition in model.save() http://stackoverflow.com/questions/3522827/handling-race-condition-in-model-save it a lot because I see it as a general case of the Hopper Principle it's easy to ask forgiveness than permission which applies widely..
Creating a singleton in python http://stackoverflow.com/questions/6760685/creating-a-singleton-in-python the singleton pattern violates the Single Responsibility Principle each class should do only one thing . That way you don't have..
OOP: good class design http://stackoverflow.com/questions/845966/oop-good-class-design when designing classes The Single Responsibility Principle A class or method should have only one reason to change. The.. should have only one reason to change. The Open Closed Principle A class or method should be open for extension and closed for.. and closed for modification. The Liskov Substitution Principle Subtypes must be substitutable for their base types. The Interface..
|