Skip to content

Instantly share code, notes, and snippets.

@cwb4
cwb4 / beautiful_idiomatic_python.md
Created August 7, 2020 17:21 — forked from 0x4D31/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@abhinavguptas
abhinavguptas / TaskAfterInsertHandler.java
Created January 2, 2012 09:40
Yet Another Apex Trigger Template
/**
After insert handler on task Sobject
*/
public class TaskAfterInsertHandler implements Triggers.Handler {
public void handle() {
System.debug(LoggingLevel.INFO, 'Post insert handling ' + Trigger.new );
}
}