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 >> C++-sig
C++-sig
[C++-sig] Re: Boost.Python unnamed enums at global scope
by David Abrahams other posts by this author
Aug 2 2003 8:21PM messages near this date
Re: [C++-sig] numarray and boost.python | [C++-sig] Re: Boost.Python unnamed enums at global scope
Hi Niall,

Please post Boost.Python questions to the C++-sig (see
http://www.boost.org/more/mailing_lists.htm).

"Niall Douglas" <ned@[...].com>  writes:

>  Hi,
> 
>  I was wondering if Boost.Python could be extended such that:
> 
>  enum_<int>("").value("CONST", CONST);
> 
>  .. would place its members in the highest scope possible ie; you'd 
>  access it as my_module.CONST.

We have an export_values() member function which accomplishes that.

http://www.boost.org/libs/python/doc/v2/enum.html#enum_-spec
 
>  I suggest this because the library I'm creating bindings for has 
>  loads of unnamed enums at global scope for creating constants and 
>  sticking them in some "unnamed" scope is counter-intuitive. Since 
>  pyste has to deal with these, it creates problems :(

If you're using Pyste, you *really* should post this to the C++-sig,
since Nicodemus (the Pyste author) doesn't read my emails.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com


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

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