Re: Overloaded Functions

2008-07-29 Thread Tim Henderson
Yes i am aware of that but I want the code to be self documenting, so the intent is clear. I actually have an implementation using that style which you suggest. I would like cleaner style, like the one i suggested in my first post. Cheers Tim Henderson -- http://mail.python.org/mailman/listinfo

Re: DB access without object-relation mapping?

2008-07-29 Thread Tim Henderson
On Jul 29, 11:20 am, kj <[EMAIL PROTECTED]> wrote: > Python noob here. > > I want to write a script that creates and populates a simple Postgres > database. > > The word on the street is to use something like SQLAlchemy for > database access in Python, but my experience in the past with > packages

Re: Build tool for Python

2008-07-29 Thread Tim Henderson
On Jul 29, 11:08 am, Hussein B <[EMAIL PROTECTED]> wrote: > Hi. > Apache Ant is the de facto building tool for Java (whether JSE, JEE > and JME) application. > With Ant you can do what ever you want: compile, generate docs, > generate code, packing, deploy, connecting to remote servers and every >

Overloaded Functions

2008-07-29 Thread Tim Henderson
d be really nice to have a unified interface into the __sign_auth function for the two different use cases. Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find duplicate 3d points?

2008-06-11 Thread Tim Henderson
ut so close to the edges that they are under .01mm from each other. in this situation if a point is less that .01mm from any edge of its bounding cube you must compare it against the points in the adjacent cubes. hope this helps a bit. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: A question on decorators

2008-03-26 Thread Tim Henderson
it some context. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

A question on decorators

2008-03-26 Thread Tim Henderson
Has any one here done anything like this before? Thank you for reading my long post, I hope you understand what I am asking especially since the code in it is not very good. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: OO question

2007-01-01 Thread Tim Henderson
On Jan 1, 8:09 pm, [EMAIL PROTECTED] wrote: > Lets say I have those two classes, Person and Address. How would one > implement the relationship between them? First, a Person can have one > or more addresses (or none), that could be represented as a list of > Addresses, right? But then, if I have an

Re: sha, PyCrypto, SHA-256

2006-12-18 Thread Tim Henderson
On Dec 16, 2:17 pm, [EMAIL PROTECTED] wrote: > Operating system: Win XP > Vsn of Python: 2.4 > > Situation is this: Required to calcluate a message digest. The process > for calcluating the digest must use an SHA-256 algorithm. > > Questions: > 1) Is it correct that the sha module comes with pytho

Re: should python have a sort list-map object in the std-lib?

2005-11-27 Thread Tim Henderson
ahh, i hadn't thought of using a proirity queue but that is the correct solution most of the time, except i suppose when you have input that causes you to excessively reheap which could be problematic. i may still look into writing a general sorted map though, it could be useful especially if ther

Re: Newbie question: Tab key giving different output

2005-11-27 Thread Tim Henderson
i think it is telling you to use spaces btw i have no idea, it just sounds like a funny thing to happen -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison problem

2005-11-27 Thread Tim Henderson
peter would not the more correct way to do this be short circuit evaluation. somthing along lines of if (len(item) > 0) and (item[0] == '-'): pass seems to be the more correct approach. rather than relying on slicing to return an empty string. For instance suppose you wanted to test to see if th

Re: Comparison problem

2005-11-27 Thread Tim Henderson
of course the more correct way is most likely the use of short circuit evaluation. so somthing along lines of if (len(item) > 0) and (item[0] == '-'): pass would probably be the correct approach. -- http://mail.python.org/mailman/listinfo/python-list

should python have a sort list-map object in the std-lib?

2005-11-27 Thread Tim Henderson
then using del list[x]) or appending each new item to the end of said list and using the built-in .sort method, or sorted() function? -- Tim Henderson mail me: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression tools?

2005-05-03 Thread Tim Henderson
I am not quite sure what you want. However if you are looking for Python's regular expression module it is the re module. Just go to interactive help and view the api for it. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: Inspect Python Classes for instance data information

2005-05-02 Thread Tim Henderson
posted. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Inspect Python Classes for instance data information

2005-05-02 Thread Tim Henderson
inspection part of this little problem. I could just have each class define its own meathod to convert to this format, but that would be a lot of work when i could just make one class that solves the problem for all classes. Is there a way to do this? cheers --- Tim Henderson mail m

re: A problem with list

2004-12-14 Thread Tim Henderson
ure: ~~ float 3.14 0 int 3 1 string Hi i am a string 2 ~~ The first way to solve your problem is quick dirty and efficient. The XML version is highly scalable but requires a lot more code to impleme