Al Hoang

August 13, 2003

Python gotchas

Filed under: programming — hoanga @ 12:58 pm

Got this link from Ted Leung on Python Programming pitfalls. Looks like an interesting read and explains some of the more subtle behaviours of Python.
The gotcha below I find really irksome:

>>> t = ([],)
>>> t[0] += [2, 3]
Traceback (most recent call last):
  File "", line 1, in ?
TypeError: object doesn't support item assignment
>>> t
([2, 3],)

A tuple is an immutable (aka it shouldn’t be able to be changed) object in Python. The += operator throws up a warning but goes ahead and changes it anyways. Ummm… that’s dumb. But all programming languages have their own sets of
annoyances. My personal pet peeve with Python is that it’s really hard to integrate into the pipeline like Perl or Ruby.

Former Sega Chairman invests heavily in technology education

Filed under: Education, japan — hoanga @ 1:17 am

Here’s an excerpt from the link:

Aiming to transform the ways children live, learn, and play in the digital age, the Massachusetts Institute of Technology (MIT) today announced the establishment of the Okawa Center for Future Children.

�The new center is made possible through a $27 million donation from Isao Okawa, Chairman of CSK Corp. and SEGA Enterprises Ltd. The donation is one of the largest in MIT’s 137-year history, and believed to be the largest gift ever by a Japanese individual to a foreign institution.

Note that this announcement was in 1998 which in Internet time is eons ago however I am not sure how many folks knew about this side of Mr. Okawa. As Chairman of Sega he saw Sega fall apart as a game console company after the launch of the Dreamcast. It’s a shame as I liked the Dreamcast however there were too many mistakes made after its release to keep it competitive in the market.
Not to mention Sony the Juggernaut just completely bowled them over in the hype department.
However it’s neat to know that Mr. Okawa donated a huge amount to help with children and technology.

Powered by WordPress

Protected by AkismetBlog with WordPress