Python 3000 Released!
Python 3000 has officially been released. The final bug — issue 2306 — “Update What’s New in 3.0″ has been closed. Python 3000, Py3k, Python 3.0, is a major release for the community. Jeremy Hylton pegs the earliest mention of the beast to January 2000. The new release has grown from pep 3000, opened April 2006.
Py3k breaks backwards compatibility with previous releases in order to reduce feature duplication and promote one obvious way of getting things done. The first major change is that print is now a builtin function and not a statement. int and long have been unified, and integer division now returns a float. Py3k uses concepts of “text” and “data” instead of “Unicode strings” and “8-bit strings”. You can read about many of the changes in What’s New In Python 3.0. Some new features have been backported to Python 2.6 so you can start implementing them in your current code to ease the transition. 2.6 also has the -3 command line switch to warn you about features that are being removed or changed. Finally, the tool 2to3 is a source-to-source translator that should automate a lot of the changes.
Documentation for the new release is online. Source packages and binaries are available now.
[Via Hack A Day]
OpenSocial: Social Javascript
This is a site about technology for developers, so I won’t get into any politics on OpenSocial and Facebook. There is already more coverage on that than you could want to read.
How is a social API interesting to Ajax developers? The main interface to the social data is through JavaScript. You can also use REST to hit the endpoints themselves, but the JavaScript API is very much the first class citizen.
If you are used to the Google Gadgets API you will probably be most familiar. Social components just have to include a one liner to their ModulePrefs:
This tells the container that you will be doing social tasks. There are three main APIs that you now have access too:
- People Data API: You can get access to owners and viewers, and their friends
- Persistence Data API: Store simple hash table data for the users using your application
- Activities Data API: Like the Facebook News feed
You will probably want to grab some social data which requires you to setup a request and grab data:
When you want to work with user data such as preferences, you will use the storage api. Here is an example from WoShamBo:

