Explore >> Select a destination


You are here

reasonableapproximation.net
| | aivarsk.com
2.8 parsecs away

Travel
| | I have a piece of C++ code that calls user-defined functions implemented in Python. Instead of requiring all functions to have the same signature with 6 arguments, the C++ code inspects the function signature and passes only the arguments function accepts - 1, 3, or all 6 of them. I use the inspect module and getargspec function for that but it feels a bit wrong and bloated. So let's see how we can get the work done without the inspect module.
| | fuzzyblog.io
2.5 parsecs away

Travel
| | [AI summary] The author discusses differences between Python and Ruby regarding dictionary key access and missing keys, highlighting cultural design philosophies and the Pythonic .get() method.
| | www.learnpython.dev
1.5 parsecs away

Travel
| | Free Learn Python Course by Nina Zakharenko - An intensive two day introduction and intermediate course on Python. Video course published on Frontend Masters.
| | yasoob.me
13.1 parsecs away

Travel
| Hi people! Recently, I was super confused when I found out that: >>> pow(3,89) runs slower than: >>> 3**89 I tried to think of a suitable answer but couldn't find any. I timed the execution of both of these statements using the timeit module in Python3: $ python3 -m timeit 'pow(3,89)' 500000 loops, best of 5: 688 nsec per loop $ python3 -m timeit '3**89' 500000 loops, best of 5: 519 nsec per loop The difference is not big.