ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
Re: [Jython-users] ovverride and operator?
by Diez B. Roggisch other posts by this author
Oct 29 2003 3:28PM messages near this date
Re: [Jython-users] ovverride and operator? | Re: [Jython-users] ovverride and operator?
>  thanks for your answers and examples.
>  I tried to override the __and__ operator on a java class and it does not
>  work ... actually it works BUT only when I call the & operator and not
>  the "and" .
>  Maybe there's a difference when dealing with Java classes ???

Ahh, thats a different thing - the __and__ gets called on the bitwise & 
operator. I don't know if there is a way to alter the logical operators 
"and", "or", "not" and so on.

What you can overload is __nonzero__, its used for logical value testing. 

Maybe you can give us some more insight of what you actually try to accomplish 
syntactically.

Diez



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Nicola de Candussio
Nicola de Candussio
Diez B. Roggisch
Diez B. Roggisch
Kent Johnson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved