xela: Photo of me (Default)
[personal profile] xela
One thing I've been doing this week (and forgetting to talk about here) is going to some SIPB IAP classes. Which I do pretty much every year, partly because I like to see how the current crop are doing at my old job, and partly because I don't really program enough that a good introductory class won't teach me something useful. Tonight's revelation was enumerators in Python. I bet I can find a couple hundred variants of for k in range(len(l)): just grepping through my personal CVS repository — any of which I still use, I can now re-write more cleanly!

I generally resist the temptation to talk about my assessments of SIPB IAP instructors (and especially the temptation to pass them on to the current IAP suckers: I feel like it would cross the line between being helpful kruft and being a prick). But I have no hesitation in saying that I think the kid who's teaching the Python class is doing a fine job. I can highly recommend the remaining two sessions (next week) to anyone who has the very basics of Python (or a sound grounding in any language) and wants to learn more.

Date: 2012-01-13 03:36 pm (UTC)
From: [identity profile] goldsquare.livejournal.com
Don't forget the other interesting/fun thing with iterators in Python. Not only is it cool that you can say "do this for alla those", but you can also DYNAMICALLY generate the list of things that are being iterated over. It's a little inefficient to build a list, then iterate, when you can create the list one element at a time when needed.

Profile

xela: Photo of me (Default)
xela

November 2022

S M T W T F S
  12345
6789101112
13141516171819
202122 23242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 28th, 2026 11:47 am
Powered by Dreamwidth Studios