mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
55 lines
2.3 KiB
HTML
55 lines
2.3 KiB
HTML
<html>
|
|
<head>
|
|
<!-- Generated by the Spirit (http://spirit.sf.net) QuickDoc -->
|
|
<title>Object Interface</title>
|
|
<link rel="stylesheet" href="theme/style.css" type="text/css">
|
|
<link rel="prev" href="auto_overloading.html">
|
|
<link rel="next" href="basic_interface.html">
|
|
</head>
|
|
<body>
|
|
<table width="100%" height="48" border="0" cellspacing="2">
|
|
<tr>
|
|
<td><img src="theme/c%2B%2Bboost.gif">
|
|
</td>
|
|
<td width="85%">
|
|
<font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Object Interface</b></font>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<table border="0">
|
|
<tr>
|
|
<td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
|
|
<td width="30"><a href="auto_overloading.html"><img src="theme/l_arr.gif" border="0"></a></td>
|
|
<td width="20"><a href="basic_interface.html"><img src="theme/r_arr.gif" border="0"></a></td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
Python is dynamically typed, unlike C++ which is statically typed. Python
|
|
variables may hold an integer, a float, list, dict, tuple, str, long etc.,
|
|
among other things. In the viewpoint of Boost.Python and C++, these
|
|
Pythonic variables are just instances of class <tt>object</tt>. We shall see in
|
|
this chapter how to deal with Python objects.</p>
|
|
<p>
|
|
As mentioned, one of the goals of Boost.Python is to provide a
|
|
bidirectional mapping between C++ and Python while maintaining the Python
|
|
feel. Boost.Python C++ <tt>object</tt>s are as close as possible to Python. This
|
|
should minimize the learning curve significantly.</p>
|
|
<p>
|
|
<img src="theme/python.png"></img></p>
|
|
<table border="0">
|
|
<tr>
|
|
<td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
|
|
<td width="30"><a href="auto_overloading.html"><img src="theme/l_arr.gif" border="0"></a></td>
|
|
<td width="20"><a href="basic_interface.html"><img src="theme/r_arr.gif" border="0"></a></td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<hr size="1"><p class="copyright">Copyright © 2002-2003 David Abrahams<br>Copyright © 2002-2003 Joel de Guzman<br><br>
|
|
<font size="2">Permission to copy, use, modify, sell and distribute this document
|
|
is granted provided this copyright notice appears in all copies. This document
|
|
is provided "as is" without express or implied warranty, and with
|
|
no claim as to its suitability for any purpose. </font> </p>
|
|
</body>
|
|
</html>
|