468,110 Members | 1,837 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

writing my own extension

hi,

i use a lot the enumerate in my scripts and got really interested in
possibly writing my own enumerate as an extension, for which i would
want to extend it to be able to pass a start and step attribute.

can anyone point me on my way with good examples for that and how to
write extensions ?

thank you in advance

Apr 10 '07 #1
1 1609
On Apr 10, 12:52 pm, "spohle" <spo...@gmail.comwrote:
hi,

i use a lot the enumerate in my scripts and got really interested in
possibly writing my own enumerate as an extension, for which i would
want to extend it to be able to pass a start and step attribute.

can anyone point me on my way with good examples for that and how to
write extensions ?

thank you in advance
The range() builtin has this functionality. Also check out
http://docs.python.org/lib/itertools-functions.html

As for writing extensions, check out the following links:

http://docs.python.org/inst/tweak-flags.html
http://docs.python.org/dist/describing-extensions.html
http://www.geocities.com/foetsch/pyt...ing_python.htm
http://cxx.sourceforge.net/
http://www.vrplumber.com/programming/mstoolkit/

Interesting notes on iterators with (or without) a "step()":

http://mail.python.org/pipermail/pyt...ry/022007.html
http://www.thescripts.com/forum/thread556059.html
http://aspn.activestate.com/ASPN/Coo.../Recipe/498272

Mike

Apr 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ever Olano | last post: by
3 posts views Thread by Csaba Gabor | last post: by
4 posts views Thread by jackpod | last post: by
7 posts views Thread by Paolo Pantaleo | last post: by
5 posts views Thread by thewritersclub | last post: by
118 posts views Thread by Chuck Cheeze | last post: by
16 posts views Thread by inhahe | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.