-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcopy.po
More file actions
120 lines (88 loc) · 11.4 KB
/
Copy pathcopy.po
File metadata and controls
120 lines (88 loc) · 11.4 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
# 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:
# Alireza Shabani (Revisto) <[email protected]>, 2025
# Rafael Fontenelle <[email protected]>, 2025
# Sepehr Rasouli <[email protected]>, 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: 2026-09-15 12:15+0330\n"
"Last-Translator: Sepehr Rasouli <[email protected]>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/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"
"X-Generator: Poedit 3.6\n"
msgid ":mod:`!copy` --- Shallow and deep copy operations"
msgstr ":mod:`!copy` --- عملیات کپی کمعمق و عمیق"
msgid "**Source code:** :source:`Lib/copy.py`"
msgstr "**کد منبع:** :source:`Lib/copy.py`"
msgid "Assignment statements in Python do not copy objects, they create bindings between a target and an object. For collections that are mutable or contain mutable items, a copy is sometimes needed so one can change one copy without changing the other. This module provides generic shallow and deep copy operations (explained below)."
msgstr "دستورهای انتساب در پایتون اشیاء را کپی نمیکنند، بلکه پیوندی بین یک هدف و یک شیء ایجاد میکنند. برای مجموعههای تغییرپذیر یا حاوی آیتمهای تغییرپذیر، گاهی به یک کپی نیاز است تا بتوان یک کپی را بدون تغییر دیگری تغییر داد. این ماژول عملیات عام کپی کمعمق و عمیق را فراهم میکند (که در ادامه توضیح داده شدهاند)."
msgid "Interface summary:"
msgstr "خلاصهی رابط:"
msgid "Return a shallow copy of *obj*."
msgstr "یک کپی سطحی از *obj* برمیگرداند."
msgid "Return a deep copy of *obj*."
msgstr "یک کپی عمیق از *obj* برمیگرداند."
msgid "Creates a new object of the same type as *obj*, replacing fields with values from *changes*."
msgstr "شیء جدیدی از همان نوع *obj* ایجاد میکند و فیلدها را با مقادیر *changes* جایگزین میکند."
msgid "Raised for module specific errors."
msgstr "برای خطاهای خاص ماژول پرتاب میشود."
msgid "The difference between shallow and deep copying is only relevant for compound objects (objects that contain other objects, like lists or class instances):"
msgstr "تفاوت میان کپی کمعمق و کپی عمیق تنها برای اشیاء مرکب (اشیایی که شامل اشیاء دیگر هستند، مانند فهرستها یا نمونههای کلاس) اهمیت دارد:"
msgid "A *shallow copy* constructs a new compound object and then (to the extent possible) inserts *references* into it to the objects found in the original."
msgstr "یک *کپی سطحی* یک شیء مرکب جدید میسازد و سپس (تا حد امکان) *ارجاعها* به اشیاء موجود در شیء اصلی را در آن درج میکند."
msgid "A *deep copy* constructs a new compound object and then, recursively, inserts *copies* into it of the objects found in the original."
msgstr "یک *کپی عمیق* یک شیء مرکب جدید میسازد و سپس، بهصورت بازگشتی، *کپیهایی* از اشیای یافتشده در شیء اصلی را در آن درج میکند."
msgid "Two problems often exist with deep copy operations that don't exist with shallow copy operations:"
msgstr "دو مشکل اغلب در عملیات کپی عمیق وجود دارد که در عملیات کپی سطحی وجود ندارد:"
msgid "Recursive objects (compound objects that, directly or indirectly, contain a reference to themselves) may cause a recursive loop."
msgstr "اشیای بازگشتی (اشیای مرکبی که بهطور مستقیم یا غیرمستقیم شامل ارجاعی به خود هستند) ممکن است باعث ایجاد یک حلقه بازگشتی شوند."
msgid "Because deep copy copies everything it may copy too much, such as data which is intended to be shared between copies."
msgstr "از آنجا که کپی عمیق همهچیز را کپی میکند، ممکن است بیش از حد کپی کند، مانند دادههایی که قرار است بین کپیها به اشتراک گذاشته شوند."
msgid "The :func:`deepcopy` function avoids these problems by:"
msgstr "تابع :func:`deepcopy` با انجام موارد زیر از این مشکلات اجتناب میکند:"
msgid "keeping a ``memo`` dictionary of objects already copied during the current copying pass; and"
msgstr "نگهداری یک دیکشنری ``memo`` از اشیایی که در طول گذر کپی جاری پیشتر کپی شدهاند؛ و"
msgid "letting user-defined classes override the copying operation or the set of components copied."
msgstr "به کلاسهای تعریفشده توسط کاربر اجازه میدهد تا عملیات کپی یا مجموعهی کامپوننتهای کپیشده را بازنویسی کنند."
msgid "This module does not copy types like module, method, stack trace, stack frame, file, socket, window, or any similar types. It does \"copy\" functions and classes (shallow and deeply), by returning the original object unchanged; this is compatible with the way these are treated by the :mod:`pickle` module."
msgstr "این ماژول انواعی مانند ماژول، متد، ردگیری پشته، فریم پشته، پرونده، سوکت، پنجره یا هر نوع مشابه را کپی نمیکند. این ماژول توابع و کلاسها را (بهصورت سطحی و عمیق) با بازگرداندن شیء اصلی بدون تغییر «کپی» میکند؛ این رفتار با نحوهی برخورد ماژول :mod:`pickle` با این موارد سازگار است."
msgid "Shallow copies of many collections can be made using the corresponding :meth:`!copy` method (such as :meth:`list.copy`, :meth:`dict.copy` or :meth:`set.copy`), and of sequences (such as lists or bytearrays) by making a slice of the entire sequence (``sequence[:]``). However, these methods and slicing can create an instance of the base type when copying an instance of a subclass, whereas :func:`copy.copy` normally returns an instance of the same type."
msgstr "میتوان کپیهای سطحی بسیاری از مجموعهها را با استفاده از متد :meth:`!copy` متناظر (مانند :meth:`list.copy`، :meth:`dict.copy` یا :meth:`set.copy`)، و کپیهای سطحی دنبالهها (مانند فهرستها یا bytearrayها) را با ایجاد اسلایسی از کل دنباله (``sequence[:]``) ساخت. با این حال، این متدها و اسلایسکردن ممکن است هنگام کپی کردن نمونهای از یک زیرکلاس، نمونهای از نوع پایه را ایجاد کنند، در حالی که :func:`copy.copy` معمولاً نمونهای از همان نوع را برمیگرداند."
msgid "Classes can use the same interfaces to control copying that they use to control pickling. See the description of module :mod:`pickle` for information on these methods. In fact, the :mod:`!copy` module uses the registered pickle functions from the :mod:`copyreg` module."
msgstr "کلاسها میتوانند برای کنترل کپیسازی از همان رابطهایی استفاده کنند که برای کنترل پیکلکردن استفاده میکنند. برای آگاهی از این متدها، توضیحات ماژول :mod:`pickle` را ببینید. در واقع، ماژول :mod:`!copy` از توابع پیکل ثبتشده در ماژول :mod:`copyreg` استفاده میکند."
msgid "In order for a class to define its own copy implementation, it can define special methods :meth:`~object.__copy__` and :meth:`~object.__deepcopy__`."
msgstr "برای اینکه یک کلاس بتواند پیادهسازی کپی خود را تعریف کند، میتواند متدهای ویژهی :meth:`~object.__copy__` و :meth:`~object.__deepcopy__` را تعریف کند."
msgid "Called to implement the shallow copy operation; no additional arguments are passed."
msgstr "برای پیادهسازی عملیات کپی کمعمق فراخوانی میشود؛ آرگومان اضافهای ارسال نمیشود."
msgid "Called to implement the deep copy operation; it is passed one argument, the *memo* dictionary. If the ``__deepcopy__`` implementation needs to make a deep copy of a component, it should call the :func:`~copy.deepcopy` function with the component as first argument and the *memo* dictionary as second argument. The *memo* dictionary should be treated as an opaque object."
msgstr "برای پیادهسازی عملیات کپی عمیق فراخوانی میشود؛ یک آرگومان به آن داده میشود، دیکشنری *memo*. اگر پیادهسازی ``__deepcopy__`` نیاز داشته باشد یک کپی عمیق از یک کامپوننت ایجاد کند، باید تابع :func:`~copy.deepcopy` را با آن کامپوننت بهعنوان آرگومان اول و دیکشنری *memo* بهعنوان آرگومان دوم فراخوانی کند. با دیکشنری *memo* باید بهعنوان یک شیء غیرشفاف رفتار شود."
msgid "Function :func:`!copy.replace` is more limited than :func:`~copy.copy` and :func:`~copy.deepcopy`, and only supports named tuples created by :func:`~collections.namedtuple`, :mod:`dataclasses`, and other classes which define method :meth:`~object.__replace__`."
msgstr "تابع :func:`!copy.replace` محدودتر از :func:`~copy.copy` و :func:`~copy.deepcopy` است و فقط از تاپلهای نامدار ایجادشده توسط :func:`~collections.namedtuple`، :mod:`dataclasses` و سایر کلاسهایی که متد :meth:`~object.__replace__` را تعریف میکنند، پشتیبانی میکند."
msgid "This method should create a new object of the same type, replacing fields with values from *changes*."
msgstr "این متد باید یک شیء جدید از همان نوع ایجاد کند و فیلدها را با مقادیر *changes* جایگزین کند."
msgid "Module :mod:`pickle`"
msgstr "ماژول :mod:`pickle`"
msgid "Discussion of the special methods used to support object state retrieval and restoration."
msgstr "بحثی دربارهی متدهای ویژهای که برای پشتیبانی از بازیابی و بازگردانی وضعیت شیء به کار میروند."
msgid "module"
msgstr "ماژول"
msgid "pickle"
msgstr "pickle"
msgid "__copy__() (copy protocol)"
msgstr "__copy__() (پروتکل کپی)"
msgid "__deepcopy__() (copy protocol)"
msgstr "__deepcopy__() (پروتکل کپی)"
msgid "__replace__() (replace protocol)"
msgstr "__replace__() (پروتکل جایگزینی)"