¡@

Home 

python Programming Glossary: surprises

Why is matrix multiplication faster with numpy than with ctypes in Python?

http://stackoverflow.com/questions/10442365/why-is-matrix-multiplication-faster-with-numpy-than-with-ctypes-in-python

and tried 3 different ways Pure python implementation no surprises here. Numpy implementation using numpy.dot a b Interfacing with..

Why do NumPy and SciPy have a lot of the same functions? Which should I prefer? [duplicate]

http://stackoverflow.com/questions/10766082/why-do-numpy-and-scipy-have-a-lot-of-the-same-functions-which-should-i-prefer

Regular Expressions in Python unexpectedly slow

http://stackoverflow.com/questions/11190835/regular-expressions-in-python-unexpectedly-slow

present the regular expression is surprisingly slow This surprises me since theoretically the regex only has to go over the string..

How to Mock an HTTP request in a unit testing scenario in Python

http://stackoverflow.com/questions/11399148/how-to-mock-an-http-request-in-a-unit-testing-scenario-in-python

Injection DI . DI is very useful for two things it avoids surprises where your code is secretely relying on some object to exist..

A question regarding string instance uniqueness in python

http://stackoverflow.com/questions/1150765/a-question-regarding-string-instance-uniqueness-in-python

mistakenly relying on such details that might cause nasty surprises . Plus it's hardly ever necessary or even particularly helpful..

Why does Python say this Netscape cookie file isn't valid?

http://stackoverflow.com/questions/11529428/why-does-python-say-this-netscape-cookie-file-isnt-valid

line at the prompt including the n newline character. Any surprises like tab characters or unicode zero width spaces will show up..

gotchas where Numpy differs from straight python?

http://stackoverflow.com/questions/1322380/gotchas-where-numpy-differs-from-straight-python

useful. Edit I was hoping to collect half a dozen gotchas surprises for people learning Numpy . Then if there are common gotchas..

Is this use of isinstance pythonic/“good”?

http://stackoverflow.com/questions/3111611/is-this-use-of-isinstance-pythonic-good

interface . This keeps the code cleaner and leaves fewer surprises for the next guy. Others may disagree but I feel there may be..

non-technical benefits of having string-type immutable

http://stackoverflow.com/questions/3584945/non-technical-benefits-of-having-string-type-immutable

hashing to effective immutability which avoids certain surprises to the programmer that are found e.g. in Perl with its hashes..

Installing PIL to use with Django on Mac OS X

http://stackoverflow.com/questions/5075620/installing-pil-to-use-with-django-on-mac-os-x

I find this keeps things clean and leads to fewer surprises down the road as things are upgraded. The next step is to create..

Python 2.x gotcha's and landmines

http://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines

better picture of it which includes knowing its faults and surprises. To keep things specific I'm only interested in the CPython..

Circular (or cyclic) imports in Python

http://stackoverflow.com/questions/744373/circular-or-cyclic-imports-in-python