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 >> cpp-sig
cpp-sig
Re: [C++-sig] Re: Boost.Python : Byref parameters - no problems with static/non-static overloading
by Joel Gerard other posts by this author
Oct 3 2003 3:50PM messages near this date
[C++-sig] Re: Boost.Python : Byref parameters - no problems with static/non-static overloading | [C++-sig] Re: (no subject)
Re (from way below):
>  Please post a doc bug in the Python bug database.
>  http://sourceforge.net/tracker/?group_id=5470

Is this is the correct bug db?  I was referring to the Boost docs. Is there a Boost bug db w
here I
should log this?

Joel

--- David Abrahams <>  wrote:
>  Joel Gerard <llywelyn.geo@[...].com> writes:
>  
>  > Ok.  I've got things mostly sorted out.  You can't overload static and non-static member
>  > functions, which is fine, but how do you use a static (not overloaded) function in Pytho
n? I
>  need
>  > to keep the static function in the class scope. The reason is name collision, i.e.
>  >
>  > class A
>  > {
>  >    static void foo();
>  > }
>  >
>  > class B 
>  > {
>  >    static void foo();
>  > }
>  
>  Do your static functions take the same sets of arguments?  If not,
>  name collision is OK because overloading will select the right one.
>  
>  > I have:
>  > class Vector
>  > {
>  > public:
>  >     static  void        Orthonormalize          (Vector& kU, Vector& kV, Vector& kW);
>  > }
>  >
>  > Wrapped as:
>  >
>  >
>  > void (*Orthonormalize2)(Vector&, Vector&, Vector&)      = &Vector::Orthonormalize;
>  > .def("Orthonormalize",Orthonormalize2)
>  >             .staticmethod("Orthonormalize")
>  >
>  > In python, do you just use it as an unbound method?  Is the self argument non-existent i
n this
>  > case, or do I do something different?
>  
>  See http://users.rcn.com/python/download/Descriptor.htm
>  
>  > Currently I have:
>  > Vector.Orthonormalize (Vector1, Vector2, Vector3)
>  >
>  > Also, is there a good place to look for python examples. I didn't see a python example i
n the
>  > docs
>  
>  Please post a doc bug in the Python bug database.
>  http://sourceforge.net/tracker/?group_id=5470


=====
--------------------------------------
Email: joelgerard@[...].com

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
David Abrahams
Joel Gerard

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