Re: finding name of instances created

2005-01-24 Thread Ryan Paul
On Mon, 24 Jan 2005 13:19:45 +, Ryan Paul wrote: > > A working solution: > > class A: > pass > > a = A() > b = A() > c = A() > > [x for x,y in locals().items() if > hasattr(y,"__class__") and y.__class__ == A] > Just wanted t

Re: finding name of instances created

2005-01-24 Thread Ryan Paul
On Fri, 21 Jan 2005 16:13:19 -0800, André wrote: > Short version of what I am looking for: > > Given a class "public_class" which is instantiated a few times e.g. > > a = public_class() > b = public_class() > c = public_class() > > I would like to find out the name of the instances so that I co

Re: What is print? A function?

2005-01-24 Thread Ryan Paul
On Sun, 23 Jan 2005 18:01:50 +, Frans Englich wrote: > > Nah, I don't think it's a function, but rather a builtin "statement". But > it's possible to invoke it as an function; print( "test" ) works fine. > > So I wonder, what _is_ exactly the print statement? The untraditional > way of invo

Re: how to call python code from C#

2005-01-25 Thread Ryan Paul
On Tue, 25 Jan 2005 00:35:04 +0530, paritosh mahana wrote: > Hi all, > How can I call python code from my C# code. One thing is to make an > .exe file of the python program and then try to call it from my C# > code. But I don't like that idea. Is there any other way to do this. > Like making a .d

Re: Optional Static Typing

2004-12-27 Thread Ryan Paul
On Thu, 23 Dec 2004 01:49:35 -0800, bearophileHUGS wrote: > Adding Optional Static Typing to Python looks like a quite complex > thing, but useful too: > http://www.artima.com/weblogs/viewpost.jsp?thread=85551 I wrote a blog post this morning in which I briefly argue using DbC and predicate based