4,272 karma · joined April 27, 2009
(gross exaggeration)
What's next, {"Top N [Nouns] to [Verb]" | N > 1}? :(
After working in a bit of py3k, I've found that "small things" such as using print() as a function rather than a statement comes more naturally than in Python 2.x, mostly because the latter doesn't complain about it.
Other things like xrange()'s departure in py3k as range() becomes a true iterator -- that's something you'll have to be cognizant of.
My advice is if you want to get a large project done, with support from popular and existing frameworks, go with the 2.x branch. If you're whipping up some disposable scripts, practice with py3k. And even if you're not, fire up py3k anyway.
One of the great Google Summer of Code projects this year is the inverse to the 2to3 tool -- 3to2 -- with the forward-thinking intention of making it easier to maintain one branch of code in py3k. It isn't a magic bullet by any means, but should definitely encourage the transition from Python 2.x to 3000.
"GET OFF MY LAWN!"
The drop is open for uploads.
[Cross posted at arclanguage.org as well]
Special software is required to use some of the files in this section: .rm.
:(Sometimes I find that I need to chain a few actions for my search results that aren't possible with multiple -execs, so I employ the shell script loop:
for js in `find . -name '*.js'`; do
dir=`dirname $js`;
cd $dir && make;
java -jar jsmin.jar "$i";
done;
Unfortunately if you've got spaces in your filenames, this will throw off /bin/sh and you have to specify delimiters or work around that.Lastly, I've found with find that if you have a n-sized conditional where n > 1 and an -exec, you'll want to use escaped parentheses or otherwise the conditionals won't evaluate properly.
Edits: addressing formatting woes.