Coding Fun

Aug. 7th, 2010 07:27 pm
andrewducker: (Default)
[personal profile] andrewducker
I've spent the afternoon playing a bit more with Google App Engine/Python.

So far it's ok - the language is simple enough, and I can make it do the bits and pieces I want so far. The main thing I miss is static typing and intellisense - everything takes so long when I have to keep looking up help files rather than having intellisense present me with a list of useful options, and the lack of type mismatch checking means finding type mismatch bugs at compile time, which seems pretty silly.

I'm also baffled as to why there's both a datetime type and a struct_time type. You'd think that something as basic as date/time representation would be baked in...

Date: 2010-08-07 06:59 pm (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
Python's ace. List comprehensions in particular.

Date: 2010-08-07 07:57 pm (UTC)
From: [identity profile] johnbobshaun.livejournal.com
Python's nifty. I use it for a bunch of automated tasks on our webservers. XML generation and making image thumbnails, for example. Amazing the amount you can get done in about fifteen lines of code.

Date: 2010-08-07 08:08 pm (UTC)
From: [identity profile] markpasc.livejournal.com
If you'll permit me: datetime is the new one (as of 2003) and is crossplatform, comprises real classes with methods, and has all the features you want for dealing with real dates and times (except for time zones, which are supported as a concept but no actual time zone objects are provided—ugh). The time module, where struct_time is, is Python's interface to the OS's time library, so it's all functions and in some places can vary between platforms.

IME you rarely if ever have to use the time module and should always use datetimes, especially in a high-level environment like App Engine.

Date: 2010-08-09 04:58 pm (UTC)
From: [identity profile] markpasc.livejournal.com
Ah, I see! Feed Parser requires only Python 2.1, so it's probably written without datetime so it doesn't require 2.3 (that 2003 release) or later.

You're welcome!

Coding Fun

Date: 2010-08-08 07:49 am (UTC)
From: [identity profile] call-waiting.livejournal.com
I have to say that in comparison to most other languages I've ever come across, Python is just a lot more *fun*.

September 2025

S M T W T F S
  12 3 4 56
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 6th, 2025 07:41 am
Powered by Dreamwidth Studios