Repository navigation
Expand file tree
/
Copy pathextending.po
More file actions
290 lines (226 loc) · 24.8 KB
/
Copy pathextending.po
File metadata and controls
290 lines (226 loc) · 24.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Danial Behzadi <dani.behzi@ubuntu.com>, 2025
# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
# Revisto <theRevisto@gmail.com>, 2025
# Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2021-06-28 00:52+0000\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "Extending/Embedding FAQ"
msgstr "پرسشهای متداول دربارهی گسترش/تعبیه"
msgid "Contents"
msgstr "محتویات"
msgid "Can I create my own functions in C?"
msgstr "آیا میتوانم توابع خود را در C بسازم؟"
msgid "Yes, you can create built-in modules containing functions, variables, exceptions and even new types in C. This is explained in the document :ref:`extending-index`."
msgstr "بله، شما میتوانید ماژولهای توکار حاوی توابع، متغیرها، استثناها و حتی انواع جدید را در C ایجاد کنید. این موضوع در سند :ref:`extending-index` توضیح داده شده است."
msgid "Most intermediate or advanced Python books will also cover this topic."
msgstr "بیشتر کتابهای سطح متوسط یا پیشرفته پایتون نیز به این موضوع میپردازند."
msgid "Can I create my own functions in C++?"
msgstr "آیا میتوانم توابع خودم را در C++ بسازم؟"
msgid "Yes, using the C compatibility features found in C++. Place ``extern \"C\" { ... }`` around the Python include files and put ``extern \"C\"`` before each function that is going to be called by the Python interpreter. Global or static C++ objects with constructors are probably not a good idea."
msgstr "بله، با استفاده از ویژگیهای سازگاری با C موجود در C++. ``extern \"C\" { ... }`` را اطراف پروندههای include پایتون قرار دهید و ``extern \"C\"`` را پیش از هر تابعی که قرار است توسط مفسر پایتون فراخوانی شود، قرار دهید. اشیاء سراسری یا ایستای C++ دارای سازنده احتمالاً ایدهی خوبی نیستند."
msgid "Writing C is hard; are there any alternatives?"
msgstr "نوشتن C دشوار است؛ آیا جایگزینهایی وجود دارد؟"
msgid "There are a number of alternatives to writing your own C extensions, depending on what you're trying to do. :ref:`Recommended third party tools <c-api-tools>` offer both simpler and more sophisticated approaches to creating C and C++ extensions for Python."
msgstr "بسته به اینکه شما میخواهید چه کاری انجام دهید، جایگزینهای متعددی برای نوشتن افزونههای C خودتان وجود دارد. :ref:`ابزارهای شخص ثالث توصیهشده <c-api-tools>` هم رویکردهایی سادهتر و هم پیشرفتهتر برای ایجاد افزونههای C و C++ برای پایتون ارائه میدهند."
msgid "How can I execute arbitrary Python statements from C?"
msgstr "چگونه میتوانم دستورات دلخواه پایتون را از C اجرا کنم؟"
msgid "The highest-level function to do this is :c:func:`PyRun_SimpleString` which takes a single string argument to be executed in the context of the module ``__main__`` and returns ``0`` for success and ``-1`` when an exception occurred (including :exc:`SyntaxError`). If you want more control, use :c:func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in ``Python/pythonrun.c``."
msgstr "بالاترین تابع از نظر سطح برای انجام این کار :c:func:`PyRun_SimpleString` است که یک آرگومان رشتهای واحد میگیرد تا در زمینهی ماژول ``__main__`` اجرا شود و در صورت موفقیت ``0`` و در صورت بروز استثنا (از جمله :exc:`SyntaxError`) ``-1`` برمیگرداند. اگر کنترل بیشتری میخواهید، از :c:func:`PyRun_String` استفاده کنید؛ کد منبع :c:func:`PyRun_SimpleString` را در ``Python/pythonrun.c`` ببینید."
msgid "How can I evaluate an arbitrary Python expression from C?"
msgstr "چگونه میتوانم یک عبارت پایتون دلخواه را از C ارزیابی کنم؟"
msgid "Call the function :c:func:`PyRun_String` from the previous question with the start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it and returns its value."
msgstr "تابع :c:func:`PyRun_String` را از پرسش قبلی با نماد آغازین :c:data:`Py_eval_input` فراخوانی کنید؛ این تابع یک عبارت را تجزیه میکند، آن را ارزیابی میکند و مقدار آن را برمیگرداند."
msgid "How do I extract C values from a Python object?"
msgstr "چگونه میتوانم مقادیر C را از یک شیء پایتون استخراج کنم؟"
msgid "That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` returns its length and :c:func:`PyTuple_GetItem` returns the item at a specified index. Lists have similar functions, :c:func:`PyList_Size` and :c:func:`PyList_GetItem`."
msgstr "این به نوع شیء بستگی دارد. اگر یک تاپل باشد، :c:func:`PyTuple_Size` طول آن را برمیگرداند و :c:func:`PyTuple_GetItem` آیتم در یک اندیس مشخص را برمیگرداند. فهرستها توابع مشابهی دارند، :c:func:`PyList_Size` و :c:func:`PyList_GetItem`."
msgid "For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:`PyBytes_AsStringAndSize` provides a pointer to its value and its length. Note that Python bytes objects may contain null bytes so C's :c:func:`!strlen` should not be used."
msgstr "برای بایتها، :c:func:`PyBytes_Size` طول آن را برمیگرداند و :c:func:`PyBytes_AsStringAndSize` اشارهگری به مقدار و طول آن در اختیار قرار میدهد. توجه داشته باشید که اشیاء بایت پایتون ممکن است حاوی بایتهای null باشند، بنابراین نباید از :c:func:`!strlen` در C استفاده شود."
msgid "To test the type of an object, first make sure it isn't ``NULL``, and then use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:`PyList_Check`, etc."
msgstr "برای بررسی نوع یک شیء، ابتدا مطمئن شوید که ``NULL`` نیست، سپس از :c:func:`PyBytes_Check`، :c:func:`PyTuple_Check`، :c:func:`PyList_Check` و غیره استفاده کنید."
msgid "There is also a high-level API to Python objects which is provided by the so-called 'abstract' interface -- read ``Include/abstract.h`` for further details. It allows interfacing with any kind of Python sequence using calls like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et al.) and mappings in the PyMapping APIs."
msgstr "همچنین یک API سطح بالا برای اشیای پایتون وجود دارد که توسط رابط بهاصطلاح «انتزاعی» ارائه میشود — برای جزئیات بیشتر ``Include/abstract.h`` را بخوانید. این رابط امکان کار با هر نوع دنبالهی پایتون را از طریق فراخوانیهایی مانند :c:func:`PySequence_Length`، :c:func:`PySequence_GetItem` و غیره، و همچنین بسیاری از پروتکلهای مفید دیگر مانند اعداد (:c:func:`PyNumber_Index` و غیره) و نگاشتها در APIهای PyMapping فراهم میکند."
msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
msgstr "چگونه از Py_BuildValue() برای ایجاد تاپلی با طول دلخواه استفاده کنم؟"
msgid "You can't. Use :c:func:`PyTuple_Pack` instead."
msgstr "نمیتوانید. بهجای آن از :c:func:`PyTuple_Pack` استفاده کنید."
msgid "How do I call an object's method from C?"
msgstr "چگونه میتوانم متد یک شیء را از C فراخوانی کنم؟"
msgid "The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary method of an object. The parameters are the object, the name of the method to call, a format string like that used with :c:func:`Py_BuildValue`, and the argument values::"
msgstr "تابع :c:func:`PyObject_CallMethod` میتواند برای فراخوانی یک متد دلخواه از یک شیء استفاده شود. پارامترها عبارتاند از شیء، نام متد برای فراخوانی، یک رشته قالب مانند آنچه با :c:func:`Py_BuildValue` استفاده میشود، و مقادیر آرگومان::"
msgid ""
"PyObject *\n"
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
" const char *arg_format, ...);"
msgstr ""
"PyObject *\n"
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
" const char *arg_format, ...);"
msgid "This works for any object that has methods -- whether built-in or user-defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the return value."
msgstr "این برای هر شیئی که متد دارد، چه توکار و چه تعریفشده توسط کاربر، کار میکند. شما مسئولید که در نهایت مقدار بازگشتی را :c:func:`Py_DECREF` کنید."
msgid "To call, e.g., a file object's \"seek\" method with arguments 10, 0 (assuming the file object pointer is \"f\")::"
msgstr "برای فراخوانی متد \"seek\" یک شیء پرونده، مثلاً با آرگومانهای ۱۰، ۰ (با فرض اینکه اشارهگر شیء پرونده \"f\" باشد)::"
msgid ""
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
"if (res == NULL) {\n"
" ... an exception occurred ...\n"
"}\n"
"else {\n"
" Py_DECREF(res);\n"
"}"
msgstr ""
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
"if (res == NULL) {\n"
" ... an exception occurred ...\n"
"}\n"
"else {\n"
" Py_DECREF(res);\n"
"}"
msgid "Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the argument list, to call a function without arguments, pass \"()\" for the format, and to call a function with one argument, surround the argument in parentheses, e.g. \"(i)\"."
msgstr "توجه داشته باشید که از آنجا که :c:func:`PyObject_CallObject` *همیشه* برای فهرست آرگومانها یک تاپل میخواهد، برای فراخوانی یک تابع بدون آرگومان، \"()\" را بهعنوان قالب ارسال کنید، و برای فراخوانی یک تابع با یک آرگومان، آرگومان را داخل پرانتز قرار دهید، برای مثال \"(i)\"."
msgid "How do I catch the output from PyErr_Print() (or anything that prints to stdout/stderr)?"
msgstr "چگونه میتوانم خروجی PyErr_Print() (یا هر چیزی که به stdout/stderr چاپ میشود) را دریافت کنم؟"
msgid "In Python code, define an object that supports the ``write()`` method. Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call print_error, or just allow the standard traceback mechanism to work. Then, the output will go wherever your ``write()`` method sends it."
msgstr "در کد پایتون، شیءای تعریف کنید که از متد ``write()`` پشتیبانی میکند. این شیء را به :data:`sys.stdout` و :data:`sys.stderr` اختصاص دهید. print_error را فراخوانی کنید، یا فقط اجازه دهید سازوکار استاندارد ردگیری پشته کار کند. سپس، خروجی به هر جایی میرود که متد ``write()`` شما آن را ارسال میکند."
msgid "The easiest way to do this is to use the :class:`io.StringIO` class:"
msgstr "سادهترین راه برای انجام این کار استفاده از کلاس :class:`io.StringIO` است:"
msgid ""
">>> import io, sys\n"
">>> sys.stdout = io.StringIO()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(sys.stdout.getvalue())\n"
"foo\n"
"hello world!"
msgstr ""
">>> import io, sys\n"
">>> sys.stdout = io.StringIO()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(sys.stdout.getvalue())\n"
"foo\n"
"hello world!"
msgid "A custom object to do the same would look like this:"
msgstr "یک شیء سفارشی برای انجام همان کار به این شکل خواهد بود:"
msgid ""
">>> import io, sys\n"
">>> class StdoutCatcher(io.TextIOBase):\n"
"... def __init__(self):\n"
"... self.data = []\n"
"... def write(self, stuff):\n"
"... self.data.append(stuff)\n"
"...\n"
">>> import sys\n"
">>> sys.stdout = StdoutCatcher()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(''.join(sys.stdout.data))\n"
"foo\n"
"hello world!"
msgstr ""
">>> import io, sys\n"
">>> class StdoutCatcher(io.TextIOBase):\n"
"... def __init__(self):\n"
"... self.data = []\n"
"... def write(self, stuff):\n"
"... self.data.append(stuff)\n"
"...\n"
">>> import sys\n"
">>> sys.stdout = StdoutCatcher()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(''.join(sys.stdout.data))\n"
"foo\n"
"hello world!"
msgid "How do I access a module written in Python from C?"
msgstr "چگونه از C به یک ماژول نوشتهشده با Python دسترسی پیدا کنم؟"
msgid "You can get a pointer to the module object as follows::"
msgstr "میتوانید یک اشارهگر به شیء ماژول را به صورت زیر دریافت کنید::"
msgid "module = PyImport_ImportModule(\"<modulename>\");"
msgstr "module = PyImport_ImportModule(\"<modulename>\");"
msgid "If the module hasn't been imported yet (i.e. it is not yet present in :data:`sys.modules`), this initializes the module; otherwise it simply returns the value of ``sys.modules[\"<modulename>\"]``. Note that it doesn't enter the module into any namespace -- it only ensures it has been initialized and is stored in :data:`sys.modules`."
msgstr "اگر ماژول هنوز ایمپورتنشده باشد (یعنی هنوز در :data:`sys.modules` موجود نباشد)، این، ماژول را مقداردهی اولیه میکند؛ در غیر این صورت، صرفاً مقدار ``sys.modules[\"<modulename>\"]`` را برمیگرداند. توجه داشته باشید که این، ماژول را وارد هیچ فضای نامی نمیکند -- فقط اطمینان حاصل میکند که ماژول مقداردهی اولیه شده و در :data:`sys.modules` ذخیره شده است."
msgid "You can then access the module's attributes (i.e. any name defined in the module) as follows::"
msgstr "سپس میتوانید به ویژگیهای ماژول (یعنی هر نام تعریفشده در ماژول) به صورت زیر دسترسی داشته باشید::"
msgid "attr = PyObject_GetAttrString(module, \"<attrname>\");"
msgstr "attr = PyObject_GetAttrString(module, \"<attrname>\");"
msgid "Calling :c:func:`PyObject_SetAttrString` to assign to variables in the module also works."
msgstr "فراخوانی :c:func:`PyObject_SetAttrString` برای انتساب به متغیرهای درون ماژول نیز کار میکند."
msgid "How do I interface to C++ objects from Python?"
msgstr "چگونه از پایتون با اشیاء C++ رابط برقرار کنم؟"
msgid "Depending on your requirements, there are many approaches. To do this manually, begin by reading :ref:`the \"Extending and Embedding\" document <extending-index>`. Realize that for the Python run-time system, there isn't a whole lot of difference between C and C++ -- so the strategy of building a new Python type around a C structure (pointer) type will also work for C++ objects."
msgstr "بسته به نیازمندیهای شما، رویکردهای زیادی وجود دارد. برای انجام این کار بهصورت دستی، با خواندن :ref:`سند \"Extending and Embedding\" <extending-index>` آغاز کنید. توجه داشته باشید که از نظر سیستم رانتایم پایتون، تفاوت چندانی میان C و C++ وجود ندارد — بنابراین راهبرد ساختن یک نوع جدید پایتون بر پایهی یک نوع ساختار C (اشارهگر) برای اشیاء C++ نیز کار خواهد کرد."
msgid "For C++ libraries, see :ref:`c-wrapper-software`."
msgstr "برای کتابخانههای C++، :ref:`c-wrapper-software` را ببینید."
msgid "I added a module using the Setup file and the make fails; why?"
msgstr "من یک ماژول را با استفاده از پرونده Setup اضافه کردم و make شکست میخورد؛ چرا؟"
msgid "Setup must end in a newline, if there is no newline there, the build process fails. (Fixing this requires some ugly shell script hackery, and this bug is so minor that it doesn't seem worth the effort.)"
msgstr "Setup باید با یک خط جدید پایان یابد؛ اگر خط جدیدی در آنجا نباشد، فرآیند ساخت شکست میخورد. (رفع این مشکل به چند ترفند زشت اسکریپت پوسته نیاز دارد، و این باگ آنقدر جزئی است که به نظر نمیرسد ارزش تلاش داشته باشد.)"
msgid "How do I debug an extension?"
msgstr "چگونه یک افزونه را اشکالزدایی کنم؟"
msgid "When using GDB with dynamically loaded extensions, you can't set a breakpoint in your extension until your extension is loaded."
msgstr "هنگام استفاده از GDB با افزونههای بارگذاریشده بهصورت پویا، تا زمانی که افزونهی شما بارگذاری نشود، نمیتوانید نقطه توقفی در افزونهی خود تنظیم کنید."
msgid "In your ``.gdbinit`` file (or interactively), add the command:"
msgstr "در پرونده ``.gdbinit`` خود (یا بهصورت تعاملی)، این دستور را اضافه کنید:"
msgid "br _PyImport_LoadDynamicModule"
msgstr "br _PyImport_LoadDynamicModule"
msgid "Then, when you run GDB:"
msgstr "سپس، هنگامی که GDB را اجرا میکنید:"
msgid ""
"$ gdb /local/bin/python\n"
"gdb) run myscript.py\n"
"gdb) continue # repeat until your extension is loaded\n"
"gdb) finish # so that your extension is loaded\n"
"gdb) br myfunction.c:50\n"
"gdb) continue"
msgstr ""
"$ gdb /local/bin/python\n"
"gdb) run myscript.py\n"
"gdb) continue # repeat until your extension is loaded\n"
"gdb) finish # so that your extension is loaded\n"
"gdb) br myfunction.c:50\n"
"gdb) continue"
msgid "I want to compile a Python module on my Linux system, but some files are missing. Why?"
msgstr "میخواهم یک ماژول پایتون را روی سیستم لینوکسی خود کامپایل کنم، اما برخی پروندهها وجود ندارند. چرا؟"
msgid "Most packaged versions of Python omit some files required for compiling Python extensions."
msgstr "بیشتر نسخههای بستهبندیشدهی پایتون، برخی از پروندههای مورد نیاز برای کامپایل افزونههای پایتون را شامل نمیشوند."
msgid "For Red Hat, install the python3-devel RPM to get the necessary files."
msgstr "برای Red Hat، بستهی RPM با نام python3-devel را نصب کنید تا پروندههای ضروری را دریافت کنید."
msgid "For Debian, run ``apt-get install python3-dev``."
msgstr "برای دبیان، ``apt-get install python3-dev`` را اجرا کنید."
msgid "How do I tell \"incomplete input\" from \"invalid input\"?"
msgstr "چگونه «ورودی ناقص» را از «ورودی نامعتبر» تشخیص دهم؟"
msgid "Sometimes you want to emulate the Python interactive interpreter's behavior, where it gives you a continuation prompt when the input is incomplete (e.g. you typed the start of an \"if\" statement or you didn't close your parentheses or triple string quotes), but it gives you a syntax error message immediately when the input is invalid."
msgstr "گاهی ممکن است بخواهید رفتار مفسر تعاملی پایتون را شبیهسازی کنید، که در آن وقتی ورودی ناقص است (مثلاً شروع یک دستور \"if\" را تایپ کردهاید یا پرانتزها یا علامتهای نقلقول سهگانهی رشته را نبستهاید)، یک اعلان ادامه به شما میدهد، اما وقتی ورودی نامعتبر است، بلافاصله یک پیام خطای سینتکس به شما میدهد."
msgid "In Python you can use the :mod:`codeop` module, which approximates the parser's behavior sufficiently. IDLE uses this, for example."
msgstr "در پایتون میتوانید از ماژول :mod:`codeop` استفاده کنید، که رفتار پارسر را بهاندازهی کافی تقریب میزند. برای مثال، IDLE از این استفاده میکند."
msgid "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` (perhaps in a separate thread) and let the Python interpreter handle the input for you. You can also set the :c:func:`PyOS_ReadlineFunctionPointer` to point at your custom input function. See ``Modules/readline.c`` and ``Parser/myreadline.c`` for more hints."
msgstr "سادهترین راه برای انجام این کار در C این است که :c:func:`PyRun_InteractiveLoop` را فراخوانی کنید (احتمالاً در یک نخ جداگانه) و اجازه دهید مفسر پایتون ورودی را برای شما مدیریت کند. همچنین میتوانید :c:func:`PyOS_ReadlineFunctionPointer` را طوری تنظیم کنید که به تابع ورودی سفارشی شما اشاره کند. برای نکات بیشتر، ``Modules/readline.c`` و ``Parser/myreadline.c`` را ببینید."
msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?"
msgstr "چگونه میتوانم نمادهای تعریفنشدهی g++ یعنی __builtin_new یا __pure_virtual را پیدا کنم؟"
msgid "To dynamically load g++ extension modules, you must recompile Python, relink it using g++ (change LINKCC in the Python Modules Makefile), and link your extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)."
msgstr "برای بارگذاری پویای ماژولهای توسعهای g++، باید پایتون را دوباره کامپایل کنید، آن را با استفاده از g++ دوباره لینک کنید (LINKCC را در Makefile ماژولهای پایتون تغییر دهید) و ماژول توسعهای خود را با استفاده از g++ لینک کنید (برای مثال، ``g++ -shared -o mymodule.so mymodule.o``)."
msgid "Can I create an object class with some methods implemented in C and others in Python (e.g. through inheritance)?"
msgstr "آیا میتوانم یک کلاس شیء بسازم که برخی از متدهای آن در C و برخی دیگر در Python پیادهسازیشده باشند (برای مثال از طریق وراثت)؟"
msgid "Yes, you can inherit from built-in classes such as :class:`int`, :class:`list`, :class:`dict`, etc."
msgstr "بله، شما میتوانید از کلاسهای توکار مانند :class:`int`، :class:`list`، :class:`dict` و غیره ارثبری کنید."
msgid "The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index.html) provides a way of doing this from C++ (i.e. you can inherit from an extension class written in C++ using the BPL)."
msgstr "کتابخانه Boost Python (BPL، https://www.boost.org/libs/python/doc/index.html) راهی برای انجام این کار از C++ فراهم میکند (یعنی میتوانید با استفاده از BPL از یک کلاس توسعه نوشتهشده به C++ ارثبری کنید)."