Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kibwen
on Sept 4, 2012
|
parent
|
context
|
favorite
| on:
Python Cheat Sheet
Any idea why they appear to prefer `cmath.pi` and `cmath.e` rather than `math.pi` and `math.e`?
on Sept 4, 2012
[3 more]
[deleted]
rom16384
on Sept 4, 2012
|
parent
[–]
While that convention is generally true, in this case the c in cmath refers to complex numbers.
kibwen
on Sept 4, 2012
|
root
|
parent
[–]
rom is correct, both the math and cmath modules are implemented in C. And even if the math module was pure Python I don't think that the speed of accessing a constant would be drastically different.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: