Unicode and dictionaries

2010-01-16 Thread gizli
Hi all, I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran into this issue yesterday and wanted to check to see if this is a python bug. It seems that there is an inconsistency between lists and dictionaries in the way that unicode objects are handled. Take a look at the foll

str and unicode proper usage

2009-12-14 Thread gizli
Hi all, If an entire application operates on Unicode strings from UI to database, is there a use case for str() and unicode() functions? The application should be able to read/write files, open sockets and execute external processes and parse their output. From my own experiments, the open() comma

Re: Automatic Attribute Assignment during Class Inheritance

2009-09-09 Thread gizli
On Sep 9, 9:00 pm, Steven D'Aprano wrote: > On Wed, 09 Sep 2009 20:14:33 -0700, gizli wrote: > > I do not want to force the consumers of this framework to write this > > obscure line of code. I was wondering if it is possible (at class > > definition time) to capture th

Automatic Attribute Assignment during Class Inheritance

2009-09-09 Thread gizli
Hi all, I have been trying to do a programming trick with python and so far I failed. I am using sqlalchemy in my code and writing a framework with it. This framework uses something called polymorphic identity attribute to define the do single table inheritance. Here's roughly how it works: 1. De