10 Nov 2009 @ 2:51 PM 

Last few days I had some time (while sitting on the train) to have a good look at the second part of the Python docs tutorial. I’ve now got a good understanding of everything up to classes, and know the most important language specific notations, behaviours and features.

So far, Python strikes me as a really nice language, with quite some features I haven’t come across before. Especially the data sequence types are neat, and you can do multi inheritance. There are a few things that I find rather odd though. These include the ability to simply add methods and fields dynamically to classes, and the inability to make class fields private, or write-only. This obviously goes against the encapsulation principle. A minor, but really awkward behaviour difference to the other languages I know is the working of the ‘whole division’-operator (in Python this is //). It works by doing a normal division and then math.floor’ing it. For positive numbers, this is no problems, but for negative numbers, you end up having a value that’s 1 off. For example, -7 // 2 will return -4, instead of -3.

Anyway, the final part of my Python studies will be to get a closer look at the Standard Library, how I can best compile applications into executables, and what GUI (and other) libraries I can use.

Posted By: Jeroen De Dauw
Last Edit: 10 Nov 2009 @ 02:52 PM

EmailPermalink
Tags


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 4744
  • Posts/Pages » 197
  • Comments » 156
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.