Re: variable declaration

2005-02-08 Thread top
Alex Martelli wrote:
[snip]
> I disagree: compile time is when the compiler is running (for
example,
> the compiler is the component which diagnoses syntax errors, while
other
> errors are diagnosed ``at runtime'').
[snip]

That thing about syntax errors is news to me. I thought they were
caught at runtime, since you can catch them as exceptions, as in:

try: prijnt projnt
except SyntaxError: print "See, it gets caught"

If this happens at compile-time, I'd like to know how.
Thanks,
--
 - Alexandre

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Assigning to self

2005-02-12 Thread top
Jeff Shannon wrote:
> class __Foo:
>  "I am a singleton!"
>  pass
>
> def Foo(foo_obj = __Foo()):
>  assert isinstance(foo_obj, __Foo
>  return foo_obj
this is a bit simpler, I think, and takes advantage from Python's free
name-rebinding.

class Singleton(object):
def __call__(self):
return self
Singleton = Singleton()

And, now, every time you say obj = Singleton(), you're getting the same
instance. Of course, this corrupt the __call__ method of the class, and
isn't inheritance-safe at all, but if you want only one or two classes
like this, it isn't very much work to implement it. Also, it's free of
weird metaclasses, __new__s, or __dict__ hacks, I think.
Just putting my two-cents into this,
--
 - Alexandre

-- 
http://mail.python.org/mailman/listinfo/python-list


topmole.com: Best of the best hardware and software lists

2006-04-05 Thread Top
Best of the best hardware lists at http://www.topmole.com

Don't waste hours searching for the best graphics card or digital camera find 
it instantly on www.topmole.com

Find the best:

AMD Socket 939 Motherboards
Internal Hard Drives
17 inch TFT Monitors
19 inch TFT Monitors
20 inch TFT Monitors
Budget Graphics Cards
Mid-Range Graphics Cards
High-End Graphics Cards
Sound Cards
Speakers
Professional Digital Cameras
Internal DVD Writers
External DVD Writers
Photo Printers
Internet Security Suites

-- 
http://mail.python.org/mailman/listinfo/python-list


Req. Designation - Jr. Software Engineer(QA)

2008-04-15 Thread ......ADMISSION IN TOP 10 IIT's and ENGINNERING COLLEGE.......
Req. Designation - Jr. Software Engineer(QA)

Company - Allindia Technologies Limited.

Criteria - Any Degree

SALARY - 2.5 to 3.5 lakhs PA.

How to apply -:

1] Click the below link and first complete your profile with your
school and college.
http://www.batchmates.com/MGMhome.asp?refid=1970195&reflink=22635

2] After completing your all details,check your email and confirm your
registration.

3] Finally,go to careers and apply for the above mentioned post(After
completing your profile,you must check your email and confirm your
registration before applying for the given job).
Visit and join
http://www.batchmates.com/MGMhome.asp?refid=1970195&reflink=22635

Pls Note:-
After registering with your school/college,please check your email
immediately.
Check the confirmation key or confirmation link.
Then only apply for the job,otherwise your application will be
rejected.
-- 
http://mail.python.org/mailman/listinfo/python-list