mdcb added the comment:

I'm going to be my own devil's advocate:

PyLong_FromLong

...

Thanks for all the links, I hadn't realized there was so much background to the 
issue, there is some good reading there too.
you've changed the title now, but in fact the intention was the other aspect, 
core nanosecond support in python. I just happened to pick timespec because it 
does the job and is reasonably widespread.

reading all this, and threading lighlty, I was playing with

class timestamp(int): pass
  """measure of time expressed as a number of nanoseconds"""

but that seems to loose the type information after doing arithmetics

x=timestamp(10)
y=timestamp(20)
type(x+y) gives <int>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23084>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to