Re: How to use internal python c funtions, from python code

2015-12-11 Thread dieter
srinivas devaki writes: > but still I think it would be cool to be able to access internal c > functions without any fuss. I can use such feature with heapq too(sift > operations), Have a look at "Cython". It is a compiler which compiles a language similar to Python with special extensions for a

Re: How to use internal python c funtions, from python code

2015-12-10 Thread srinivas devaki
Thank you Chris, later I decided that this would be cheating and I have to think about another algorithmic approach. most of the competitive programming platforms provide python with a time limit of 5 times of c/c++ time limit. but in many cases like if the algorithms are recursive(like segment

Re: How to use internal python c funtions, from python code

2015-12-09 Thread Chris Angelico
On Thu, Dec 10, 2015 at 3:44 PM, srinivas devaki wrote: > For competitive programming purposes I really want to use those functions > for speed. Recommendation: Write your code the simple and obvious way, and *then* start thinking about speed. And before you look at calling on C code manually, tr