-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdatamodel.po
More file actions
3081 lines (2167 loc) · 347 KB
/
Copy pathdatamodel.po
File metadata and controls
3081 lines (2167 loc) · 347 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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# 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) <theRevisto@gmail.com>, 2025
# Danial Behzadi <dani.behzi@ubuntu.com>, 2025
# Rafael Fontenelle <rffontenelle@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-24 04:09+0000\n"
"PO-Revision-Date: 2026-09-12 16:43+0330\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"
"X-Generator: Poedit 3.6\n"
msgid "Data model"
msgstr "مدل داده"
msgid "Objects, values and types"
msgstr "اشیاء، مقادیر و انواع"
msgid ":dfn:`Objects` are Python's abstraction for data. All data in a Python program is represented by objects or by relations between objects. Even code is represented by objects."
msgstr ":dfn:`اشیاء (Objects)` انتزاع پایتون برای دادهها هستند. تمام دادهها در یک برنامه پایتون بهوسیله اشیاء یا روابط میان اشیاء نمایش داده میشوند. حتی کد نیز بهوسیله اشیاء نمایش داده میشود."
msgid "Every object has an identity, a type and a value. An object's *identity* never changes once it has been created; you may think of it as the object's address in memory. The :keyword:`is` operator compares the identity of two objects; the :func:`id` function returns an integer representing its identity."
msgstr "هر شیء یک هویت، یک نوع و یک مقدار دارد. *هویت* یک شیء پس از ایجاد شدن هرگز تغییر نمیکند؛ میتوانید آن را بهعنوان نشانی شیء در حافظه در نظر بگیرید. عملگر :keyword:`is` هویت دو شیء را مقایسه میکند؛ تابع :func:`id` عدد صحیحی را برمیگرداند که نشاندهندهی هویت آن است."
msgid "For CPython, ``id(x)`` is the memory address where ``x`` is stored."
msgstr "در CPython، ``id(x)`` نشانی حافظهای است که ``x`` در آن ذخیره شده است."
msgid "An object's type determines the operations that the object supports (e.g., \"does it have a length?\") and also defines the possible values for objects of that type. The :func:`type` function returns an object's type (which is an object itself). Like its identity, an object's :dfn:`type` is also unchangeable. [#]_"
msgstr "نوع یک شیء عملیاتی را که آن شیء از آنها پشتیبانی میکند (برای مثال، «آیا طول دارد؟») تعیین میکند و همچنین مقادیر ممکن برای اشیاء آن نوع را تعریف میکند. تابع :func:`type` نوع یک شیء را برمیگرداند (که خود یک شیء است). همانند هویت یک شیء، :dfn:`type` آن نیز تغییرناپذیر است. [#]_"
msgid "The *value* of some objects can change. Objects whose value can change are said to be *mutable*; objects whose value is unchangeable once they are created are called *immutable*. (The value of an immutable container object that contains a reference to a mutable object can change when the latter's value is changed; however the container is still considered immutable, because the collection of objects it contains cannot be changed. So, immutability is not strictly the same as having an unchangeable value, it is more subtle.) An object's mutability is determined by its type; for instance, numbers, strings and tuples are immutable, while dictionaries and lists are mutable."
msgstr "*مقدار* برخی شیءها میتواند تغییر کند. به اشیایی که مقدارشان میتواند تغییر کند، *تغییرپذیر* گفته میشود؛ به اشیایی که مقدارشان پس از ایجاد شدن تغییرناپذیر است، *تغییرناپذیر* نامیده میشوند. (مقدار یک شیء ظرف تغییرناپذیر که شامل ارجاعی به یک شیء تغییرپذیر است، میتواند وقتی مقدار شیء اخیر تغییر کند، تغییر کند؛ با این حال آن ظرف همچنان تغییرناپذیر در نظر گرفته میشود، زیرا مجموعه اشیایی که در بر دارد نمیتواند تغییر کند. بنابراین، تغییرناپذیری بهطور دقیق همان داشتن مقدار تغییرناپذیر نیست، بلکه موضوع ظریفتری است.) تغییرپذیری یک شیء توسط نوع آن تعیین میشود؛ برای نمونه، اعداد، رشتهها و تاپلها تغییرناپذیرند، در حالی که دیکشنریها و فهرستها تغییرپذیرند."
msgid "Objects are never explicitly destroyed; however, when they become unreachable they may be garbage-collected. An implementation is allowed to postpone garbage collection or omit it altogether --- it is a matter of implementation quality how garbage collection is implemented, as long as no objects are collected that are still reachable."
msgstr "اشیاء هرگز بهصورت صریح تخریب نمیشوند؛ با این حال، هنگامی که غیرقابلدسترس شوند، ممکن است زبالهروبی شوند. یک پیادهسازی مجاز است زبالهروبی را به تعویق بیندازد یا بهکلی از آن صرفنظر کند --- اینکه زبالهروبی چگونه پیادهسازی میشود، موضوعی مربوط به کیفیت پیادهسازی است، به شرطی که هیچ شیءای که هنوز قابلدسترس است جمعآوری نشود."
msgid "CPython currently uses a reference-counting scheme with (optional) delayed detection of cyclically linked garbage, which collects most objects as soon as they become unreachable, but is not guaranteed to collect garbage containing circular references. See the documentation of the :mod:`gc` module for information on controlling the collection of cyclic garbage. Other implementations act differently and CPython may change. Do not depend on immediate finalization of objects when they become unreachable (so you should always close files explicitly)."
msgstr "CPython در حال حاضر از یک سازوکار شمارش ارجاع با تشخیص با تأخیر (اختیاری) زبالههای دارای پیوند حلقهای استفاده میکند، که بیشتر اشیاء را بهمحض غیرقابلدسترس شدن جمعآوری میکند، اما تضمینی برای جمعآوری زبالههای حاوی ارجاعهای حلقهای وجود ندارد. برای اطلاعات درباره کنترل جمعآوری زبالههای حلقهای، مستندات ماژول :mod:`gc` را ببینید. پیادهسازیهای دیگر رفتار متفاوتی دارند و ممکن است CPython تغییر کند. به نهاییسازی فوری اشیاء هنگام غیرقابلدسترس شدن آنها وابسته نباشید (بنابراین باید همیشه پروندهها را بهصراحت ببندید)."
msgid "Note that the use of the implementation's tracing or debugging facilities may keep objects alive that would normally be collectable. Also note that catching an exception with a :keyword:`try`...\\ :keyword:`except` statement may keep objects alive."
msgstr "توجه داشته باشید که استفاده از امکانات ردگیری یا اشکالزدایی پیادهسازی ممکن است اشیایی را که در حالت عادی قابل جمعآوری بودند، زنده نگه دارد. همچنین توجه داشته باشید که گرفتن یک استثنا با یک دستور :keyword:`try`...\\ :keyword:`except` ممکن است اشیایی را زنده نگه دارد."
msgid "Some objects contain references to \"external\" resources such as open files or windows. It is understood that these resources are freed when the object is garbage-collected, but since garbage collection is not guaranteed to happen, such objects also provide an explicit way to release the external resource, usually a :meth:`!close` method. Programs are strongly recommended to explicitly close such objects. The :keyword:`try`...\\ :keyword:`finally` statement and the :keyword:`with` statement provide convenient ways to do this."
msgstr "برخی شیءها حاوی ارجاعات به منابع «خارجی» مانند پروندههای باز یا پنجرهها هستند. فرض بر این است که این منابع هنگام زبالهروبی شیء آزاد میشوند، اما از آنجا که وقوع زبالهروبی تضمین نمیشود، چنین اشیایی همچنین یک راه صریح برای آزاد کردن منبع خارجی ارائه میدهند، که معمولاً یک متد :meth:`!close` است. بهشدت توصیه میشود که برنامهها چنین اشیایی را بهصورت صریح ببندند. دستور :keyword:`try`...\\ :keyword:`finally` و دستور :keyword:`with` راههای مناسبی برای این کار فراهم میکنند."
msgid "Some objects contain references to other objects; these are called *containers*. Examples of containers are tuples, lists and dictionaries. The references are part of a container's value. In most cases, when we talk about the value of a container, we imply the values, not the identities of the contained objects; however, when we talk about the mutability of a container, only the identities of the immediately contained objects are implied. So, if an immutable container (like a tuple) contains a reference to a mutable object, its value changes if that mutable object is changed."
msgstr "برخی اشیاء شامل ارجاعهایی به اشیاء دیگر هستند؛ به این اشیاء *ظرف* گفته میشود. نمونههایی از ظرفها عبارتاند از تاپلها، فهرستها و دیکشنریها. این ارجاعها بخشی از مقدار یک ظرف هستند. در بیشتر موارد، وقتی از مقدار یک ظرف صحبت میکنیم، منظور ما مقدارها است، نه هویتهای اشیاء درون آن؛ اما وقتی از تغییرپذیری یک ظرف صحبت میکنیم، فقط هویتهای اشیایی که مستقیماً در آن قرار دارند منظور است. بنابراین، اگر یک ظرف تغییرناپذیر (مانند یک تاپل) شامل ارجاعی به یک شیء تغییرپذیر باشد، با تغییر آن شیء تغییرپذیر، مقدار آن ظرف تغییر میکند."
msgid "Types affect almost all aspects of object behavior. Even the importance of object identity is affected in some sense: for immutable types, operations that compute new values may actually return a reference to any existing object with the same type and value, while for mutable objects this is not allowed. For example, after ``a = 1; b = 1``, *a* and *b* may or may not refer to the same object with the value one, depending on the implementation. This is because :class:`int` is an immutable type, so the reference to ``1`` can be reused. This behaviour depends on the implementation used, so should not be relied upon, but is something to be aware of when making use of object identity tests. However, after ``c = []; d = []``, *c* and *d* are guaranteed to refer to two different, unique, newly created empty lists. (Note that ``e = f = []`` assigns the *same* object to both *e* and *f*.)"
msgstr "انواع تقریباً بر تمام جنبههای رفتار شیء تأثیر میگذارند. حتی اهمیت هویت شیء نیز بهمعنایی تحت تأثیر قرار میگیرد: برای انواع تغییرناپذیر، عملیاتی که مقادیر جدیدی را محاسبه میکنند ممکن است در واقع ارجاعی به هر شیء موجودی با همان نوع و مقدار را برگردانند، در حالی که برای اشیای تغییرپذیر این کار مجاز نیست. برای مثال، پس از ``a = 1; b = 1``، بسته به پیادهسازی، ممکن است *a* و *b* به شیء یکسانی با مقدار ۱ ارجاع دهند یا ندهند. دلیل آن این است که :class:`int` یک نوع تغییرناپذیر است، بنابراین میتوان ارجاع به ``1`` را دوباره استفاده کرد. این رفتار به پیادهسازی استفادهشده بستگی دارد، بنابراین نباید به آن اتکا کرد، اما نکتهای است که هنگام استفاده از آزمونهای هویت شیء باید از آن آگاه بود. با این حال، پس از ``c = []; d = []``، تضمین میشود که *c* و *d* به دو فهرست خالی متفاوت و یکتا که بهتازگی ایجاد شدهاند ارجاع میدهند. (توجه داشته باشید که ``e = f = []`` شیء *یکسان* را به هر دو *e* و *f* اختصاص میدهد.)"
msgid "The standard type hierarchy"
msgstr "سلسلهمراتب انواع استاندارد"
msgid "Below is a list of the types that are built into Python. Extension modules (written in C, Java, or other languages, depending on the implementation) can define additional types. Future versions of Python may add types to the type hierarchy (e.g., rational numbers, efficiently stored arrays of integers, etc.), although such additions will often be provided via the standard library instead."
msgstr "در زیر فهرستی از انواع توکار پایتون آمده است. ماژولهای توسعه (که بسته به پیادهسازی، به زبان C، Java یا زبانهای دیگر نوشته شدهاند) میتوانند انواع بیشتری تعریف کنند. نسخههای آینده پایتون ممکن است انواعی را به سلسلهمراتب انواع اضافه کنند (مانند اعداد گویا، آرایههایی از اعداد صحیح با ذخیرهسازی کارآمد و غیره)، اگرچه چنین افزودنیهایی اغلب بهجای آن از طریق کتابخانه استاندارد ارائه خواهند شد."
msgid "Some of the type descriptions below contain a paragraph listing 'special attributes.' These are attributes that provide access to the implementation and are not intended for general use. Their definition may change in the future."
msgstr "برخی از توصیفهای نوع در زیر شامل پاراگرافی هستند که «ویژگیهای خاص» را فهرست میکند. اینها ویژگیهایی هستند که دسترسی به پیادهسازی را فراهم میکنند و برای استفاده عمومی در نظر گرفته نشدهاند. تعریف آنها ممکن است در آینده تغییر کند."
msgid "None"
msgstr "None"
msgid "This type has a single value. There is a single object with this value. This object is accessed through the built-in name ``None``. It is used to signify the absence of a value in many situations, e.g., it is returned from functions that don't explicitly return anything. Its truth value is false."
msgstr "این نوع تنها یک مقدار دارد. تنها یک شیء با این مقدار وجود دارد. این شیء از طریق نام توکار ``None`` قابل دسترسی است. از آن برای نشان دادن نبود یک مقدار در موقعیتهای بسیاری استفاده میشود، برای مثال، این مقدار از توابعی که بهطور صریح چیزی را برنمیگردانند، برگردانده میشود. مقدار حقیقت آن نادرست است."
msgid "NotImplemented"
msgstr "NotImplemented"
msgid "This type has a single value. There is a single object with this value. This object is accessed through the built-in name :data:`NotImplemented`. Numeric methods and rich comparison methods should return this value if they do not implement the operation for the operands provided. (The interpreter will then try the reflected operation, or some other fallback, depending on the operator.) It should not be evaluated in a boolean context."
msgstr "این نوع یک مقدار واحد دارد. تنها یک شیء با این مقدار وجود دارد. این شیء از طریق نام توکار :data:`NotImplemented` قابل دسترسی است. متدهای عددی و متدهای مقایسهی غنی، اگر عملیات را برای عملوندهای ارائهشده پیادهسازی نمیکنند، باید این مقدار را برگردانند. (مفسر سپس بسته به عملگر، عملیات بازتابی یا راهحل جایگزین دیگری را امتحان میکند.) این مقدار نباید در یک زمینهی بولی ارزیابی شود."
msgid "See :ref:`implementing-the-arithmetic-operations` for more details."
msgstr "برای جزئیات بیشتر، :ref:`implementing-the-arithmetic-operations` را ببینید."
msgid "Evaluating :data:`NotImplemented` in a boolean context was deprecated."
msgstr "ارزیابی :data:`NotImplemented` در زمینهی بولی منسوخ شد."
msgid "Evaluating :data:`NotImplemented` in a boolean context now raises a :exc:`TypeError`. It previously evaluated to :const:`True` and emitted a :exc:`DeprecationWarning` since Python 3.9."
msgstr "ارزیابی :data:`NotImplemented` در زمینهی بولی اکنون یک :exc:`TypeError` پرتاب میکند. این مقدار پیشتر به :const:`True` ارزیابی میشد و از پایتون 3.9 یک :exc:`DeprecationWarning` نشان میداد."
msgid "Ellipsis"
msgstr "سهنقطه (Ellipsis)"
msgid "This type has a single value. There is a single object with this value. This object is accessed through the literal ``...`` or the built-in name ``Ellipsis``. Its truth value is true."
msgstr "این نوع تنها یک مقدار دارد. تنها یک شیء با این مقدار وجود دارد. به این شیء از طریق لفظی ``...`` یا نام توکار ``Ellipsis`` دسترسی پیدا میشود. مقدار صدق آن درست است."
msgid ":class:`numbers.Number`"
msgstr ":class:`numbers.Number`"
msgid "These are created by numeric literals and returned as results by arithmetic operators and arithmetic built-in functions. Numeric objects are immutable; once created their value never changes. Python numbers are of course strongly related to mathematical numbers, but subject to the limitations of numerical representation in computers."
msgstr "اینها توسط مقادیر لفظی عددی ایجاد میشوند و بهوسیلهی عملگرهای حسابی و توابع توکار حسابی بهعنوان نتیجه برگردانده میشوند. اشیاء عددی تغییرناپذیر هستند؛ پس از ایجاد، مقدار آنها هرگز تغییر نمیکند. البته اعداد پایتون بهشدت با اعداد ریاضی مرتبط هستند، اما مشمول محدودیتهای بازنمایی عددی در رایانهها هستند."
msgid "The string representations of the numeric classes, computed by :meth:`~object.__repr__` and :meth:`~object.__str__`, have the following properties:"
msgstr "بازنماییهای رشتهای کلاسهای عددی، که توسط :meth:`~object.__repr__` و :meth:`~object.__str__` محاسبه میشوند، دارای ویژگیهای زیر هستند:"
msgid "They are valid numeric literals which, when passed to their class constructor, produce an object having the value of the original numeric."
msgstr "آنها لیترالهای عددی معتبری هستند که هنگام ارسال به سازندهی کلاسشان، یک شیء با مقدار عددی اصلی تولید میکنند."
msgid "The representation is in base 10, when possible."
msgstr "نمایش، در صورت امکان، در مبنای ۱۰ است."
msgid "Leading zeros, possibly excepting a single zero before a decimal point, are not shown."
msgstr "صفرهای آغازین، بهجز احتمالاً یک صفر پیش از نقطه اعشار، نمایش داده نمیشوند."
msgid "Trailing zeros, possibly excepting a single zero after a decimal point, are not shown."
msgstr "صفرهای انتهایی، بهجز احتمالاً یک صفر پس از نقطهی اعشار، نمایش داده نمیشوند."
msgid "A sign is shown only when the number is negative."
msgstr "علامت فقط زمانی نمایش داده میشود که عدد منفی باشد."
msgid "Python distinguishes between integers, floating-point numbers, and complex numbers:"
msgstr "پایتون میان اعداد صحیح، اعداد ممیز شناور و اعداد مختلط تمایز قائل میشود:"
msgid ":class:`numbers.Integral`"
msgstr ":class:`numbers.Integral`"
msgid "These represent elements from the mathematical set of integers (positive and negative)."
msgstr "اینها نشاندهندهی عناصری از مجموعهی ریاضی اعداد صحیح (مثبت و منفی) هستند."
msgid "The rules for integer representation are intended to give the most meaningful interpretation of shift and mask operations involving negative integers."
msgstr "هدف از قوانین بازنمایی اعداد صحیح، ارائه معنادارترین تفسیر از عملیات شیفت و نقاب بر روی اعداد صحیح منفی است."
msgid "There are two types of integers:"
msgstr "دو نوع عدد صحیح وجود دارد:"
msgid "Integers (:class:`int`)"
msgstr "اعداد صحیح (:class:`int`)"
msgid "These represent numbers in an unlimited range, subject to available (virtual) memory only. For the purpose of shift and mask operations, a binary representation is assumed, and negative numbers are represented in a variant of 2's complement which gives the illusion of an infinite string of sign bits extending to the left."
msgstr "اینها اعداد را در محدودهای نامحدود نشان میدهند و تنها به حافظه (مجازی) در دسترس محدود هستند. برای عملیات شیفت و نقاب، نمایش دودویی فرض میشود و اعداد منفی بهصورت گونهای از مکمل ۲ نمایش داده میشوند که گویی رشتهای بینهایت از بیتهای علامت به سمت چپ امتداد دارد."
msgid "Booleans (:class:`bool`)"
msgstr "بولیها (:class:`bool`)"
msgid "These represent the truth values False and True. The two objects representing the values ``False`` and ``True`` are the only Boolean objects. The Boolean type is a subtype of the integer type, and Boolean values behave like the values 0 and 1, respectively, in almost all contexts, the exception being that when converted to a string, the strings ``\"False\"`` or ``\"True\"`` are returned, respectively."
msgstr "اینها نمایندهی مقادیر صدق False و True هستند. دو شیء نمایندهی مقادیر ``False`` و ``True``، تنها اشیای بولی هستند. نوع بولی، زیرنوعی از نوع عدد صحیح است و مقادیر بولی تقریباً در همهی زمینهها بهترتیب مانند مقادیر ۰ و ۱ رفتار میکنند، به این استثنا که وقتی به یک رشته تبدیل شوند، بهترتیب رشتههای ``\"False\"`` یا ``\"True\"`` برگردانده میشوند."
msgid ":class:`numbers.Real` (:class:`float`)"
msgstr ":class:`numbers.Real` (:class:`float`)"
msgid "These represent machine-level double precision floating-point numbers. You are at the mercy of the underlying machine architecture (and C or Java implementation) for the accepted range and handling of overflow. Python does not support single-precision floating-point numbers; the savings in processor and memory usage that are usually the reason for using these are dwarfed by the overhead of using objects in Python, so there is no reason to complicate the language with two kinds of floating-point numbers."
msgstr "اینها نشاندهنده اعداد ممیز شناور با دقت مضاعف در سطح ماشین هستند. شما برای محدوده پذیرفتهشده و مدیریت سرریز به معماری ماشین زیربنایی (و پیادهسازی C یا Java) وابسته هستید. پایتون از اعداد ممیز شناور با دقت منفرد پشتیبانی نمیکند؛ صرفهجویی در مصرف پردازنده و حافظه که معمولاً دلیل استفاده از این موارد است، در برابر سربار استفاده از اشیاء در پایتون ناچیز میشود، بنابراین دلیلی برای پیچیده کردن زبان با دو نوع عدد ممیز شناور وجود ندارد."
msgid ":class:`numbers.Complex` (:class:`complex`)"
msgstr ":class:`numbers.Complex` (:class:`complex`)"
msgid "These represent complex numbers as a pair of machine-level double precision floating-point numbers. The same caveats apply as for floating-point numbers. The real and imaginary parts of a complex number ``z`` can be retrieved through the read-only attributes ``z.real`` and ``z.imag``."
msgstr "این موارد اعداد مختلط را بهصورت یک جفت عدد ممیز شناور با دقت مضاعف در سطح ماشین نشان میدهند. همان ملاحظات مربوط به اعداد ممیز شناور در اینجا نیز صدق میکند. بخشهای حقیقی و موهومی یک عدد مختلط ``z`` را میتوان از طریق ویژگیهای فقطخواندنی ``z.real`` و ``z.imag`` بازیابی کرد."
msgid "Sequences"
msgstr "دنبالهها"
msgid "These represent finite ordered sets indexed by non-negative numbers. The built-in function :func:`len` returns the number of items of a sequence. When the length of a sequence is *n*, the index set contains the numbers 0, 1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``. Some sequences, including built-in sequences, interpret negative subscripts by adding the sequence length. For example, ``a[-2]`` equals ``a[n-2]``, the second to last item of sequence a with length ``n``."
msgstr "این موارد نشاندهندهی مجموعههای متناهی مرتبی هستند که با اعداد غیرمنفی اندیسگذاری شدهاند. تابع توکار :func:`len` تعداد آیتمهای یک دنباله را برمیگرداند. هنگامی که طول یک دنباله *n* باشد، مجموعهی اندیس شامل اعداد ۰، ۱، ...، *n*-۱ است. آیتم *i* از دنباله *a* با ``a[i]`` انتخاب میشود. برخی از دنبالهها، از جمله دنبالههای توکار، اندیسهای منفی را با افزودن طول دنباله تفسیر میکنند. برای مثال، ``a[-2]`` برابر با ``a[n-2]`` است، یعنی دومین آیتم از انتهای دنباله a با طول ``n``."
msgid "The resulting value must be a nonnegative integer less than the number of items in the sequence. If it is not, an :exc:`IndexError` is raised."
msgstr "مقدار حاصل باید یک عدد صحیح نامنفی کمتر از تعداد آیتمهای دنباله باشد. در غیر این صورت، یک :exc:`IndexError` پرتاب میشود."
msgid "Sequences also support slicing: ``a[start:stop]`` selects all items with index *k* such that *start* ``<=`` *k* ``<`` *stop*. When used as an expression, a slice is a sequence of the same type. The comment above about negative subscripts also applies to negative slice positions. Note that no error is raised if a slice position is less than zero or larger than the length of the sequence."
msgstr "دنبالهها همچنین از اسلایس پشتیبانی میکنند: ``a[start:stop]`` تمام آیتمهایی با اندیس *k* را انتخاب میکند، بهطوری که *start* ``<=`` *k* ``<`` *stop* باشد. هنگامی که بهعنوان عبارت استفاده شود، یک اسلایس دنبالهای از همان نوع است. کامنت بالا دربارهی اندیسهای منفی، دربارهی موقعیتهای منفی اسلایس نیز صدق میکند. توجه داشته باشید که اگر یک موقعیت اسلایس کمتر از ۰ یا بزرگتر از طول دنباله باشد، هیچ خطایی پرتاب نمیشود."
msgid "If *start* is missing or :data:`None`, slicing behaves as if *start* was zero. If *stop* is missing or ``None``, slicing behaves as if *stop* was equal to the length of the sequence."
msgstr "اگر *start* موجود نباشد یا :data:`None` باشد، اسلایس چنان رفتار میکند که گویی *start* صفر بوده است. اگر *stop* موجود نباشد یا ``None`` باشد، اسلایس چنان رفتار میکند که گویی *stop* برابر با طول دنباله بوده است."
msgid "Some sequences also support \"extended slicing\" with a third \"step\" parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*."
msgstr "برخی از دنبالهها نیز از «اسلایس گسترده (extended slicing)» با یک پارامتر سوم «گام (step)» پشتیبانی میکنند: ``a[i:j:k]`` تمام آیتمهای *a* را با اندیس *x* انتخاب میکند، که در آن ``x = i + n*k``، *n* ``>=`` ``0`` و *i* ``<=`` *x* ``<`` *j* است."
msgid "Sequences are distinguished according to their mutability:"
msgstr "دنبالهها بر اساس تغییرپذیری خود متمایز میشوند:"
msgid "Immutable sequences"
msgstr "دنبالههای تغییرناپذیر"
msgid "An object of an immutable sequence type cannot change once it is created. (If the object contains references to other objects, these other objects may be mutable and may be changed; however, the collection of objects directly referenced by an immutable object cannot change.)"
msgstr "یک شیء از نوع دنبالهای تغییرناپذیر، پس از ایجاد نمیتواند تغییر کند. (اگر شیء شامل ارجاعهایی به اشیای دیگر باشد، آن اشیای دیگر ممکن است تغییرپذیر باشند و بتوان آنها را تغییر داد؛ با این حال، مجموعهی اشیایی که یک شیء تغییرناپذیر مستقیماً به آنها ارجاع دارد، نمیتواند تغییر کند.)"
msgid "The following types are immutable sequences:"
msgstr "انواع زیر دنبالههای تغییرناپذیر هستند:"
msgid "Strings"
msgstr "رشتهها"
msgid "A string (:class:`str`) is a sequence of values that represent :dfn:`characters`, or more formally, *Unicode code points*. All the code points in the range ``0`` to ``0x10FFFF`` can be represented in a string."
msgstr "یک رشته (:class:`str`) دنبالهای از مقادیر است که :dfn:`نویسهها (characters)`، یا بهطور رسمیتر، *نقاط کد یونیکد* را نشان میدهند. همهی نقاط کد در بازهی ``0`` تا ``0x10FFFF`` را میتوان در یک رشته نمایش داد."
msgid "Python doesn't have a dedicated *character* type. Instead, every code point in the string is represented as a string object with length ``1``."
msgstr "پایتون یک نوع اختصاصی برای *نویسه* ندارد. در عوض، هر نقطهکد در رشته بهعنوان یک شیء رشته با طول ``1`` نمایش داده میشود."
msgid "The built-in function :func:`ord` converts a code point from its string form to an integer in the range ``0`` to ``0x10FFFF``; :func:`chr` converts an integer in the range ``0`` to ``0x10FFFF`` to the corresponding length ``1`` string object. :meth:`str.encode` can be used to convert a :class:`str` to :class:`bytes` using the given text encoding, and :meth:`bytes.decode` can be used to achieve the opposite."
msgstr "تابع توکار :func:`ord` یک نقطه کد را از صورت رشتهای آن به یک عدد صحیح در بازهی ``0`` تا ``0x10FFFF`` تبدیل میکند؛ :func:`chr` یک عدد صحیح در بازهی ``0`` تا ``0x10FFFF`` را به شیء رشتهای متناظر به طول ``1`` تبدیل میکند. میتوان از :meth:`str.encode` برای تبدیل یک :class:`str` به :class:`bytes` با استفاده از کدگذاری متن دادهشده استفاده کرد، و میتوان از :meth:`bytes.decode` برای دستیابی به عمل معکوس استفاده کرد."
msgid "Tuples"
msgstr "تاپلها"
msgid "The items of a :class:`tuple` are arbitrary Python objects. Tuples of two or more items are formed by comma-separated lists of expressions. A tuple of one item (a 'singleton') can be formed by affixing a comma to an expression (an expression by itself does not create a tuple, since parentheses must be usable for grouping of expressions). An empty tuple can be formed by an empty pair of parentheses."
msgstr "آیتمهای یک :class:`tuple`، اشیای دلخواه پایتون هستند. تاپلهای دارای دو یا چند آیتم با فهرستهایی از عبارتها که با کاما از هم جدا شدهاند تشکیل میشوند. یک تاپل با یک آیتم (یک «تکعضوی») میتواند با افزودن یک کاما به یک عبارت تشکیل شود (یک عبارت بهتنهایی یک تاپل ایجاد نمیکند، زیرا باید بتوان از پرانتزها برای گروهبندی عبارتها استفاده کرد). یک تاپل خالی میتواند با یک جفت پرانتز خالی تشکیل شود."
msgid "Bytes"
msgstr "بایتها"
msgid "A :class:`bytes` object is an immutable array. The items are 8-bit bytes, represented by integers in the range 0 <= x < 256. Bytes literals (like ``b'abc'``) and the built-in :func:`bytes` constructor can be used to create bytes objects. Also, bytes objects can be decoded to strings via the :meth:`~bytes.decode` method."
msgstr "شیء :class:`bytes` یک آرایه تغییرناپذیر است. آیتمها بایتهای ۸ بیتی هستند که با اعداد صحیح در بازهی 0 <= x < 256 نمایش داده میشوند. مقادیر لفظی bytes (مانند ``b'abc'``) و سازنده توکار :func:`bytes` را میتوان برای ایجاد اشیاء bytes استفاده کرد. همچنین، اشیاء bytes را میتوان از طریق متد :meth:`~bytes.decode` به رشتهها کدگشایی کرد."
msgid "Mutable sequences"
msgstr "دنبالههای تغییرپذیر"
msgid "Mutable sequences can be changed after they are created. The subscription and slicing notations can be used as the target of assignment and :keyword:`del` (delete) statements."
msgstr "دنبالههای تغییرپذیر را میتوان پس از ایجاد شدن تغییر داد. از نمادگذاریهای زیرنویسی و اسلایس میتوان بهعنوان هدف دستورهای انتساب و :keyword:`del` (حذف) استفاده کرد."
msgid "The :mod:`collections` and :mod:`array` module provide additional examples of mutable sequence types."
msgstr "ماژولهای :mod:`collections` و :mod:`array` نمونههای بیشتری از انواع دنباله تغییرپذیر ارائه میدهند."
msgid "There are currently two intrinsic mutable sequence types:"
msgstr "در حال حاضر دو نوع دنباله تغییرپذیر ذاتی وجود دارد:"
msgid "Lists"
msgstr "فهرستها"
msgid "The items of a list are arbitrary Python objects. Lists are formed by placing a comma-separated list of expressions in square brackets. (Note that there are no special cases needed to form lists of length 0 or 1.)"
msgstr "آیتمهای یک فهرست، اشیای دلخواه پایتون هستند. فهرستها با قرار دادن فهرستی از عبارتها که با کاما از هم جدا شدهاند، بین کروشهها تشکیل میشوند. (توجه داشته باشید که برای تشکیل فهرستهایی با طول ۰ یا ۱ به حالت خاصی نیاز نیست.)"
msgid "Byte Arrays"
msgstr "آرایههای بایت"
msgid "A bytearray object is a mutable array. They are created by the built-in :func:`bytearray` constructor. Aside from being mutable (and hence unhashable), byte arrays otherwise provide the same interface and functionality as immutable :class:`bytes` objects."
msgstr "یک شیء bytearray یک آرایه تغییرپذیر است. این اشیاء با سازنده توکار :func:`bytearray` ایجاد میشوند. جدای از تغییرپذیر بودن (و بنابراین هشناپذیر (unhashable))، آرایههای بایتی در بقیه موارد همان رابط و عملکرد اشیاء تغییرناپذیر :class:`bytes` را ارائه میدهند."
msgid "Set types"
msgstr "انواع مجموعه"
msgid "These represent unordered, finite sets of unique, immutable objects. As such, they cannot be indexed by any subscript. However, they can be iterated over, and the built-in function :func:`len` returns the number of items in a set. Common uses for sets are fast membership testing, removing duplicates from a sequence, and computing mathematical operations such as intersection, union, difference, and symmetric difference."
msgstr "اینها نشاندهندهی مجموعههای متناهی و بدون ترتیب از اشیای یکتا و تغییرناپذیر هستند. به همین دلیل، نمیتوان آنها را با هیچ زیرنویسی اندیسگذاری کرد. با این حال، میتوان آنها را پیمایش کرد، و تابع توکار :func:`len` تعداد آیتمهای موجود در یک مجموعه را برمیگرداند. از کاربردهای رایج مجموعهها میتوان به بررسی سریع عضویت، حذف موارد تکراری از یک دنباله، و محاسبهی عملیات ریاضی مانند اشتراک، اجتماع، تفاوت، و تفاوت متقارن اشاره کرد."
msgid "For set elements, the same immutability rules apply as for dictionary keys. Note that numeric types obey the normal rules for numeric comparison: if two numbers compare equal (e.g., ``1`` and ``1.0``), only one of them can be contained in a set."
msgstr "برای عناصر مجموعه، همان قواعد تغییرناپذیری کلیدهای دیکشنری اعمال میشود. توجه داشته باشید که انواع عددی از قواعد عادی مقایسه عددی پیروی میکنند: اگر دو عدد در مقایسه برابر باشند (مثلاً ``1`` و ``1.0``)، تنها یکی از آنها میتواند در یک مجموعه قرار داشته باشد."
msgid "There are currently two intrinsic set types:"
msgstr "در حال حاضر دو نوع مجموعهی درونی وجود دارد:"
msgid "Sets"
msgstr "مجموعهها"
msgid "These represent a mutable set. They are created by the built-in :func:`set` constructor and can be modified afterwards by several methods, such as :meth:`~set.add`."
msgstr "اینها نشاندهندهی یک مجموعهی تغییرپذیر هستند. آنها با سازندهی توکار :func:`set` ایجاد میشوند و سپس میتوان آنها را با چندین متد، مانند :meth:`~set.add`، تغییر داد."
msgid "Frozen sets"
msgstr "مجموعههای فریزشده"
msgid "These represent an immutable set. They are created by the built-in :func:`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, it can be used again as an element of another set, or as a dictionary key."
msgstr "اینها نشاندهندهی یک مجموعه تغییرناپذیر هستند. آنها بهوسیلهی سازندهی توکار :func:`frozenset` ایجاد میشوند. از آنجا که frozenset تغییرناپذیر و :term:`هشپذیر <hashable>` است، میتواند دوباره بهعنوان عنصری از مجموعهای دیگر، یا بهعنوان کلید دیکشنری استفاده شود."
msgid "Mappings"
msgstr "نگاشتها"
msgid "These represent finite sets of objects indexed by arbitrary index sets. The subscript notation ``a[k]`` selects the item indexed by ``k`` from the mapping ``a``; this can be used in expressions and as the target of assignments or :keyword:`del` statements. The built-in function :func:`len` returns the number of items in a mapping."
msgstr "اینها نشاندهنده مجموعههای متناهی از اشیای اندیسدهیشده با مجموعههای اندیس دلخواه هستند. نمادگذاری اندیسدهی ``a[k]`` آیتمی را که با ``k`` از نگاشت ``a`` اندیسدهی شده است انتخاب میکند؛ میتوان از آن در عبارتها و بهعنوان هدف انتسابها یا دستورات :keyword:`del` استفاده کرد. تابع توکار :func:`len` تعداد آیتمهای یک نگاشت را برمیگرداند."
msgid "There is currently a single intrinsic mapping type:"
msgstr "در حال حاضر تنها یک نوع نگاشت ذاتی وجود دارد:"
msgid "Dictionaries"
msgstr "دیکشنریها"
msgid "These represent finite sets of objects indexed by nearly arbitrary values. The only types of values not acceptable as keys are values containing lists or dictionaries or other mutable types that are compared by value rather than by object identity, the reason being that the efficient implementation of dictionaries requires a key's hash value to remain constant. Numeric types used for keys obey the normal rules for numeric comparison: if two numbers compare equal (e.g., ``1`` and ``1.0``) then they can be used interchangeably to index the same dictionary entry."
msgstr "اینها مجموعههای متناهی از اشیاء را نشان میدهند که با مقادیر تقریباً دلخواه اندیسدهی شدهاند. تنها انواع مقادیری که بهعنوان کلید قابلقبول نیستند، مقادیری هستند که حاوی فهرستها، دیکشنریها یا سایر انواع تغییرپذیری باشند که بهجای هویت شیء، بر اساس مقدار مقایسه میشوند؛ دلیل این امر آن است که پیادهسازی کارآمد دیکشنریها مستلزم آن است که مقدار هش یک کلید ثابت بماند. انواع عددی استفادهشده برای کلیدها از قواعد عادی مقایسه عددی پیروی میکنند: اگر دو عدد در مقایسه برابر باشند (مثلاً ``1`` و ``1.0``)، در این صورت میتوانند بهجای یکدیگر برای اندیسدهی به یک ورودی دیکشنری استفاده شوند."
msgid "Dictionaries preserve insertion order, meaning that keys will be produced in the same order they were added sequentially over the dictionary. Replacing an existing key does not change the order, however removing a key and re-inserting it will add it to the end instead of keeping its old place."
msgstr "دیکشنریها ترتیب درج را حفظ میکنند، به این معنا که کلیدها به همان ترتیبی که بهصورت متوالی در دیکشنری اضافه شدهاند، تولید میشوند. جایگزینی یک کلید موجود، ترتیب را تغییر نمیدهد؛ اما حذف یک کلید و درج مجدد آن، بهجای حفظ جایگاه قبلیاش، آن را به انتها اضافه میکند."
msgid "Dictionaries are mutable; they can be created by the ``{}`` notation (see section :ref:`dict`)."
msgstr "دیکشنریها تغییرپذیرند؛ میتوان آنها را با نماد ``{}`` ایجاد کرد (بخش :ref:`dict` را ببینید)."
msgid "The extension modules :mod:`dbm.ndbm` and :mod:`dbm.gnu` provide additional examples of mapping types, as does the :mod:`collections` module."
msgstr "ماژولهای توسعهای :mod:`dbm.ndbm` و :mod:`dbm.gnu` نمونههای بیشتری از انواع نگاشت را ارائه میدهند، همانگونه که ماژول :mod:`collections` نیز چنین میکند."
msgid "Dictionaries did not preserve insertion order in versions of Python before 3.6. In CPython 3.6, insertion order was preserved, but it was considered an implementation detail at that time rather than a language guarantee."
msgstr "دیکشنریها در نسخههای پایتون پیش از 3.6 ترتیب درج را حفظ نمیکردند. در CPython 3.6، ترتیب درج حفظ میشد، اما در آن زمان این موضوع بهجای یک تضمین زبانی، یک جزئیات پیادهسازی در نظر گرفته میشد."
msgid "Callable types"
msgstr "انواع فراخوانیپذیر"
msgid "These are the types to which the function call operation (see section :ref:`calls`) can be applied:"
msgstr "اینها انواعی هستند که عملیات فراخوانی تابع (به بخش :ref:`calls` مراجعه کنید) میتواند بر آنها اعمال شود:"
msgid "User-defined functions"
msgstr "توابع تعریفشده توسط کاربر"
msgid "A user-defined function object is created by a function definition (see section :ref:`function`). It should be called with an argument list containing the same number of items as the function's formal parameter list."
msgstr "یک شیء تابع تعریفشده توسط کاربر، با یک تعریف تابع ایجاد میشود (بخش :ref:`تابع <function>` را ببینید). این تابع باید با فهرستی از آرگومانها فراخوانی شود که تعداد آیتمهای آن برابر با تعداد پارامترهای صوری تابع باشد."
msgid "Special read-only attributes"
msgstr "ویژگیهای خاص فقطخواندنی"
msgid "Attribute"
msgstr "ویژگی"
msgid "Meaning"
msgstr "معنی"
msgid "A reference to the :class:`dictionary <dict>` that holds the function's builtins namespace."
msgstr "ارجاعی به :class:`dictionary <dict>` که فضای نام توکارهای تابع را نگه میدارد."
msgid "A reference to the :class:`dictionary <dict>` that holds the function's :ref:`global variables <naming>` -- the global namespace of the module in which the function was defined."
msgstr "ارجاعی به :class:`دیکشنری <dict>` که :ref:`متغیرهای سراسری <naming>` تابع را در خود نگه میدارد — فضای نام سراسری ماژولی که تابع در آن تعریف شده است."
msgid "``None`` or a :class:`tuple` of cells that contain bindings for the names specified in the :attr:`~codeobject.co_freevars` attribute of the function's :attr:`code object <function.__code__>`."
msgstr "``None`` یا یک :class:`tuple` از سلولهایی که شامل اتصالهایی برای نامهای مشخصشده در ویژگی :attr:`~codeobject.co_freevars` از :attr:`شیء کد <function.__code__>` تابع هستند."
msgid "A cell object has the attribute ``cell_contents``. This can be used to get the value of the cell, as well as set the value."
msgstr "یک شیء سلول دارای ویژگی ``cell_contents`` است. میتوان از آن برای دریافت مقدار سلول و همچنین تنظیم مقدار آن استفاده کرد."
msgid "Special writable attributes"
msgstr "ویژگیهای ویژه قابلنوشتن"
msgid "Most of these attributes check the type of the assigned value:"
msgstr "بیشتر این ویژگیها نوع مقدار تخصیصدادهشده را بررسی میکنند:"
msgid "The function's documentation string, or ``None`` if unavailable."
msgstr "رشتهی مستندسازی تابع، یا ``None`` اگر در دسترس نباشد."
msgid "The function's name. See also: :attr:`__name__ attributes <definition.__name__>`."
msgstr "نام تابع. همچنین ببینید: :attr:`ویژگیهای __name__ <definition.__name__>`."
msgid "The function's :term:`qualified name`. See also: :attr:`__qualname__ attributes <definition.__qualname__>`."
msgstr ":term:`نام کامل <qualified name>` تابع. همچنین ببینید: :attr:`ویژگیهای __qualname__ <definition.__qualname__>`."
msgid "The name of the module the function was defined in, or ``None`` if unavailable."
msgstr "نام ماژولی که تابع در آن تعریف شده است، یا ``None`` اگر در دسترس نباشد."
msgid "A :class:`tuple` containing default :term:`parameter` values for those parameters that have defaults, or ``None`` if no parameters have a default value."
msgstr "یک :class:`tuple` شامل مقادیر پیشفرض :term:`پارامتر <parameter>` برای آن دسته از پارامترهایی که مقدار پیشفرض دارند، یا ``None`` در صورتی که هیچ پارامتری مقدار پیشفرض نداشته باشد."
msgid "The :ref:`code object <code-objects>` representing the compiled function body."
msgstr ":ref:`شیء کد <code-objects>` که بدنهی تابع کامپایلشده را نشان میدهد."
msgid "The namespace supporting arbitrary function attributes. See also: :attr:`__dict__ attributes <object.__dict__>`."
msgstr "فضای نامی که از ویژگیهای دلخواه تابع پشتیبانی میکند. همچنین ببینید: :attr:`__dict__ attributes <object.__dict__>`."
msgid "A :class:`dictionary <dict>` containing annotations of :term:`parameters <parameter>`. The keys of the dictionary are the parameter names, and ``'return'`` for the return annotation, if provided. See also: :attr:`object.__annotations__`."
msgstr "یک :class:`دیکشنری <dict>` شامل حاشیهنویسیهای :term:`پارامترها <parameter>`. کلیدهای دیکشنری، نامهای پارامترها هستند و ``'return'`` برای حاشیهنویسی بازگشت، در صورت ارائه شدن. همچنین ببینید: :attr:`object.__annotations__`."
msgid "Annotations are now :ref:`lazily evaluated <lazy-evaluation>`. See :pep:`649`."
msgstr "حاشیهنویسیها اکنون :ref:`بهصورت تنبل ارزیابی میشوند <lazy-evaluation>`. :pep:`649` را ببینید."
msgid "The :term:`annotate function` for this function, or ``None`` if the function has no annotations. See :attr:`object.__annotate__`."
msgstr ":term:`annotate function` برای این تابع، یا ``None`` اگر این تابع فاقد حاشیهنویسی باشد. :attr:`object.__annotate__` را ببینید."
msgid "A :class:`dictionary <dict>` containing defaults for keyword-only :term:`parameters <parameter>`."
msgstr "یک :class:`دیکشنری <dict>` شامل مقادیر پیشفرض برای :term:`پارامترهای <parameter>` فقط کلیدواژهای."
msgid "A :class:`tuple` containing the :ref:`type parameters <type-params>` of a :ref:`generic function <generic-functions>`."
msgstr "یک :class:`tuple` شامل :ref:`پارامترهای نوع <type-params>` یک :ref:`تابع عام <generic-functions>`."
msgid "Function objects also support getting and setting arbitrary attributes, which can be used, for example, to attach metadata to functions. Regular attribute dot-notation is used to get and set such attributes."
msgstr "اشیای تابعی همچنین از دریافت و تنظیم ویژگیهای دلخواه پشتیبانی میکنند، که میتوان از آنها برای مثال برای اتصال فراداده به توابع استفاده کرد. برای دریافت و تنظیم چنین ویژگیهایی از سینتکس نقطهای معمول ویژگیها استفاده میشود."
msgid "CPython's current implementation only supports function attributes on user-defined functions. Function attributes on :ref:`built-in functions <builtin-functions>` may be supported in the future."
msgstr "پیادهسازی فعلی CPython فقط از ویژگیهای تابع در توابع تعریفشده توسط کاربر پشتیبانی میکند. ممکن است در آینده از ویژگیهای تابع در :ref:`توابع توکار <builtin-functions>` پشتیبانی شود."
msgid "Additional information about a function's definition can be retrieved from its :ref:`code object <code-objects>` (accessible via the :attr:`~function.__code__` attribute)."
msgstr "اطلاعات بیشتری درباره تعریف یک تابع را میتوان از :ref:`شیء کد <code-objects>` آن (قابل دسترسی از طریق ویژگی :attr:`~function.__code__`) بازیابی کرد."
msgid "Instance methods"
msgstr "متدهای نمونه"
msgid "An instance method object combines a class, a class instance and any callable object (normally a user-defined function)."
msgstr "یک شیء متد نمونه، یک کلاس، یک نمونهی کلاس و هر شیء فراخوانیپذیر (معمولاً یک تابع تعریفشده توسط کاربر) را ترکیب میکند."
msgid "Special read-only attributes:"
msgstr "ویژگیهای خاص فقطخواندنی:"
msgid "Refers to the class instance object to which the method is :ref:`bound <method-binding>`"
msgstr "به شیء نمونه کلاس اشاره میکند که متد به آن :ref:`متصل <method-binding>` است"
msgid "Refers to the original :ref:`function object <user-defined-funcs>`"
msgstr "به :ref:`شیء تابع اصلی <user-defined-funcs>` ارجاع میدهد"
msgid "The method's documentation (same as :attr:`method.__func__.__doc__ <function.__doc__>`). A :class:`string <str>` if the original function had a docstring, else ``None``."
msgstr "مستندات متد (مشابه :attr:`method.__func__.__doc__ <function.__doc__>`). اگر تابع اصلی رشته مستندسازی داشته باشد، یک :class:`رشته <str>`، در غیر این صورت ``None``."
msgid "The name of the method (same as :attr:`method.__func__.__name__ <function.__name__>`)"
msgstr "نام متد (همان :attr:`method.__func__.__name__ <function.__name__>`)"
msgid "The name of the module the method was defined in, or ``None`` if unavailable."
msgstr "نام ماژولی که متد در آن تعریف شده است، یا ``None`` اگر در دسترس نباشد."
msgid "Methods also support accessing (but not setting) the arbitrary function attributes on the underlying :ref:`function object <user-defined-funcs>`."
msgstr "متدها همچنین از دسترسی (اما نه تنظیم) به ویژگیهای دلخواه تابع در :ref:`شیء تابع <user-defined-funcs>` زیربنایی پشتیبانی میکنند."
msgid "User-defined method objects may be created when getting an attribute of a class (perhaps via an instance of that class), if that attribute is a user-defined :ref:`function object <user-defined-funcs>` or a :class:`classmethod` object."
msgstr "اشیای متد تعریفشده توسط کاربر ممکن است هنگام دریافت یک ویژگی از یک کلاس (شاید از طریق یک نمونه از آن کلاس) ایجاد شوند، در صورتی که آن ویژگی یک :ref:`شیء تابع <user-defined-funcs>` تعریفشده توسط کاربر یا یک شیء :class:`classmethod` باشد."
msgid "When an instance method object is created by retrieving a user-defined :ref:`function object <user-defined-funcs>` from a class via one of its instances, its :attr:`~method.__self__` attribute is the instance, and the method object is said to be *bound*. The new method's :attr:`~method.__func__` attribute is the original function object."
msgstr "هنگامی که یک شیء متدِ نمونه با بازیابی یک :ref:`شیء تابع <user-defined-funcs>` تعریفشده توسط کاربر از یک کلاس از طریق یکی از نمونههای آن ایجاد میشود، ویژگی :attr:`~method.__self__` آن، همان نمونه است و شیء متد *مقید* نامیده میشود. ویژگی :attr:`~method.__func__` متد جدید، شیء تابع اصلی است."
msgid "When an instance method object is created by retrieving a :class:`classmethod` object from a class or instance, its :attr:`~method.__self__` attribute is the class itself, and its :attr:`~method.__func__` attribute is the function object underlying the class method."
msgstr "هنگامی که یک شیء متد نمونه با بازیابی یک شیء :class:`classmethod` از یک کلاس یا نمونه ایجاد میشود، ویژگی :attr:`~method.__self__` آن خود کلاس است، و ویژگی :attr:`~method.__func__` آن شیء تابعی است که زیربنای متد کلاس است."
msgid "When an instance method object is called, the underlying function (:attr:`~method.__func__`) is called, inserting the class instance (:attr:`~method.__self__`) in front of the argument list. For instance, when :class:`!C` is a class which contains a definition for a function :meth:`!f`, and ``x`` is an instance of :class:`!C`, calling ``x.f(1)`` is equivalent to calling ``C.f(x, 1)``."
msgstr "هنگامی که یک شیء متد نمونه فراخوانی میشود، تابع زیربنایی (:attr:`~method.__func__`) فراخوانی میشود و نمونهی کلاس (:attr:`~method.__self__`) در ابتدای فهرست آرگومانها قرار میگیرد. برای مثال، وقتی :class:`!C` کلاسی باشد که شامل تعریفی برای تابع :meth:`!f` است و ``x`` نمونهای از :class:`!C` باشد، فراخوانی ``x.f(1)`` معادل فراخوانی ``C.f(x, 1)`` است."
msgid "When an instance method object is derived from a :class:`classmethod` object, the \"class instance\" stored in :attr:`~method.__self__` will actually be the class itself, so that calling either ``x.f(1)`` or ``C.f(1)`` is equivalent to calling ``f(C,1)`` where ``f`` is the underlying function."
msgstr "هنگامی که یک شیء متد نمونه از یک شیء :class:`classmethod` مشتق شود، «نمونه کلاس» ذخیرهشده در :attr:`~method.__self__` در واقع خود کلاس خواهد بود، بنابراین فراخوانی ``x.f(1)`` یا ``C.f(1)`` معادل فراخوانی ``f(C,1)`` است که در آن ``f`` تابع زیرین است."
msgid "It is important to note that user-defined functions which are attributes of a class instance are not converted to bound methods; this *only* happens when the function is an attribute of the class."
msgstr "توجه داشته باشید که توابع تعریفشده توسط کاربر که ویژگیهای یک نمونه کلاس هستند، به متدهای مقید تبدیل نمیشوند؛ این اتفاق *فقط* زمانی رخ میدهد که تابع یک ویژگی کلاس باشد."
msgid "Generator functions"
msgstr "توابع تولیدگر"
msgid "A function or method which contains a :keyword:`yield` expression (see section :ref:`yieldexpr`) is called a :dfn:`generator function`. Such a function, when called, always returns an :term:`iterator` object which can be used to execute the body of the function: calling the iterator's :meth:`iterator.__next__` method will cause the function to execute until it provides a value using the :keyword:`!yield` expression. When the function executes a :keyword:`return` statement or falls off the end, a :exc:`StopIteration` exception is raised and the iterator will have reached the end of the set of values to be returned."
msgstr "تابعی یا متدی که حاوی یک عبارت :keyword:`yield` باشد (بخش :ref:`yieldexpr` را ببینید) یک :dfn:`generator function` نامیده میشود. چنین تابعی، وقتی فراخوانی شود، همیشه یک شیء :term:`پیمایشگر <iterator>` برمیگرداند که میتوان از آن برای اجرای بدنهی تابع استفاده کرد: فراخوانی متد :meth:`iterator.__next__` پیمایشگر باعث میشود تابع تا زمانی اجرا شود که مقداری را با استفاده از عبارت :keyword:`!yield` فراهم کند. وقتی تابع یک دستور :keyword:`return` را اجرا میکند یا به پایان میرسد، یک استثنای :exc:`StopIteration` طرح میشود و پیمایشگر به پایان مجموعهی مقادیر برای بازگشت رسیده خواهد بود."
msgid "Coroutine functions"
msgstr "توابع همروال"
msgid "A function or method which is defined using :keyword:`async def` is called a :dfn:`coroutine function`. Such a function, when called, returns a :term:`coroutine` object. It may contain :keyword:`await` expressions, as well as :keyword:`async with` and :keyword:`async for` statements. See also the :ref:`coroutine-objects` section."
msgstr "به تابع یا متدی که با استفاده از :keyword:`async def` تعریفشده باشد، یک :dfn:`تابع همروال (coroutine function)` گفته میشود. چنین تابعی، هنگام فراخوانی، یک شیء :term:`همروال <coroutine>` برمیگرداند. این تابع ممکن است شامل عبارتهای :keyword:`await`، و همچنین دستورهای :keyword:`async with` و :keyword:`async for` باشد. همچنین بخش :ref:`coroutine-objects` را ببینید."
msgid "Asynchronous generator functions"
msgstr "توابع تولیدگر ناهمگام"
msgid "A function or method which is defined using :keyword:`async def` and which contains a :keyword:`yield` expression is called a :dfn:`asynchronous generator function`. Such a function, when called, returns an :term:`asynchronous iterator` object which can be used in an :keyword:`async for` statement to execute the body of the function."
msgstr "تابعی یا متدی که با استفاده از :keyword:`async def` تعریف شده باشد و حاوی یک عبارت :keyword:`yield` باشد، یک :dfn:`asynchronous generator function` نامیده میشود. چنین تابعی، وقتی فراخوانی شود، یک شیء :term:`پیمایشگر ناهمگام <asynchronous iterator>` برمیگرداند که میتوان از آن در یک دستور :keyword:`async for` برای اجرای بدنهی تابع استفاده کرد."
msgid "Calling the asynchronous iterator's :meth:`aiterator.__anext__ <object.__anext__>` method will return an :term:`awaitable` which when awaited will execute until it provides a value using the :keyword:`yield` expression. When the function executes an empty :keyword:`return` statement or falls off the end, a :exc:`StopAsyncIteration` exception is raised and the asynchronous iterator will have reached the end of the set of values to be yielded."
msgstr "فراخوانی متد :meth:`aiterator.__anext__ <object.__anext__>` پیمایشگری ناهمگام، یک :term:`awaitable` را برمیگرداند که هنگامی که await شود، تا زمانی اجرا میشود که با استفاده از عبارت :keyword:`yield` مقداری ارائه کند. هنگامی که تابع یک دستور :keyword:`return` خالی را اجرا کند یا به انتهای خود برسد، استثنای :exc:`StopAsyncIteration` پرتاب میشود و پیمایشگری ناهمگام به پایان مجموعهی مقادیری که باید yield شوند، رسیده است."
msgid "Built-in functions"
msgstr "توابع توکار"
msgid "A built-in function object is a wrapper around a C function. Examples of built-in functions are :func:`len` and :func:`math.sin` (:mod:`math` is a standard built-in module). The number and type of the arguments are determined by the C function. Special read-only attributes:"
msgstr "یک شیء تابع توکار، دربرگیرندهای برای یک تابع C است. نمونههایی از توابع توکار عبارتاند از :func:`len` و :func:`math.sin` (:mod:`math` یک ماژول توکار استاندارد است). تعداد و نوع آرگومانها توسط تابع C تعیین میشود. ویژگیهای فقطخواندنی ویژه:"
msgid ":attr:`!__doc__` is the function's documentation string, or ``None`` if unavailable. See :attr:`function.__doc__`."
msgstr ":attr:`!__doc__` رشتهی مستندسازی تابع است، یا ``None`` اگر در دسترس نباشد. :attr:`function.__doc__` را ببینید."
msgid ":attr:`!__name__` is the function's name. See :attr:`function.__name__`."
msgstr ":attr:`!__name__` نام تابع است. :attr:`function.__name__` را ببینید."
msgid ":attr:`!__self__` is set to ``None`` (but see the next item)."
msgstr ":attr:`!__self__` روی ``None`` تنظیم میشود (اما آیتم بعدی را ببینید)."
msgid ":attr:`!__module__` is the name of the module the function was defined in or ``None`` if unavailable. See :attr:`function.__module__`."
msgstr ":attr:`!__module__` نام ماژولی است که تابع در آن تعریف شده است، یا اگر در دسترس نباشد ``None`` است. :attr:`function.__module__` را ببینید."
msgid "Built-in methods"
msgstr "متدهای توکار"
msgid "This is really a different disguise of a built-in function, this time containing an object passed to the C function as an implicit extra argument. An example of a built-in method is ``alist.append()``, assuming *alist* is a list object. In this case, the special read-only attribute :attr:`!__self__` is set to the object denoted by *alist*. (The attribute has the same semantics as it does with :attr:`other instance methods <method.__self__>`.)"
msgstr "این در واقع نمای متفاوتی از یک تابع توکار است و این بار شامل یک شیء است که بهعنوان یک آرگومان اضافی ضمنی به تابع C ارسال میشود. نمونهای از یک متد توکار ``alist.append()`` است، با فرض اینکه *alist* یک شیء فهرست باشد. در این حالت، ویژگی خاص فقطخواندنی :attr:`!__self__` به شیئی که *alist* به آن اشاره دارد تنظیم میشود. (این ویژگی همان معنایی را دارد که در :attr:`سایر متدهای نمونه <method.__self__>` دارد.)"
msgid "Classes"
msgstr "کلاسها"
msgid "Classes are callable. These objects normally act as factories for new instances of themselves, but variations are possible for class types that override :meth:`~object.__new__`. The arguments of the call are passed to :meth:`!__new__` and, in the typical case, to :meth:`~object.__init__` to initialize the new instance."
msgstr "کلاسها فراخوانیپذیر هستند. این اشیاء معمولاً بهعنوان کارخانههایی برای نمونههای جدیدی از خودشان عمل میکنند، اما برای انواع کلاسی که :meth:`~object.__new__` را بازنویسی میکنند، تفاوتهایی ممکن است وجود داشته باشد. آرگومانهای فراخوانی به :meth:`!__new__` و، در حالت معمول، به :meth:`~object.__init__` ارسال میشوند تا نمونهی جدید مقداردهی اولیه شود."
msgid "Class Instances"
msgstr "نمونههای کلاس"
msgid "Instances of arbitrary classes can be made callable by defining a :meth:`~object.__call__` method in their class."
msgstr "نمونههای کلاسهای دلخواه را میتوان با تعریف یک متد :meth:`~object.__call__` در کلاس آنها فراخوانیپذیر کرد."
msgid "Modules"
msgstr "ماژولها"
msgid "Modules are a basic organizational unit of Python code, and are created by the :ref:`import system <importsystem>` as invoked either by the :keyword:`import` statement, or by calling functions such as :func:`importlib.import_module` and built-in :func:`__import__`. A module object has a namespace implemented by a :class:`dictionary <dict>` object (this is the dictionary referenced by the :attr:`~function.__globals__` attribute of functions defined in the module). Attribute references are translated to lookups in this dictionary, e.g., ``m.x`` is equivalent to ``m.__dict__[\"x\"]``. A module object does not contain the code object used to initialize the module (since it isn't needed once the initialization is done)."
msgstr "ماژولها واحد پایهی سازماندهی کد پایتون هستند و توسط :ref:`سامانهی ایمپورت <importsystem>` ایجاد میشوند؛ این سامانه یا با دستور :keyword:`import` یا با فراخوانی توابعی مانند :func:`importlib.import_module` و تابع توکار :func:`__import__` فراخوانی میشود. یک شیء ماژول فضای نامی دارد که با یک شیء :class:`دیکشنری <dict>` پیادهسازی شده است (این همان دیکشنری است که ویژگی :attr:`~function.__globals__` توابع تعریفشده در ماژول به آن ارجاع میدهد). ارجاعهای ویژگی به جستوجوها در این دیکشنری تبدیل میشوند، برای مثال ``m.x`` معادل ``m.__dict__[\"x\"]`` است. یک شیء ماژول شامل شیء کد مورد استفاده برای مقداردهی اولیهی ماژول نمیشود (زیرا پس از انجام مقداردهی اولیه، دیگر به آن نیازی نیست)."
msgid "Attribute assignment updates the module's namespace dictionary, e.g., ``m.x = 1`` is equivalent to ``m.__dict__[\"x\"] = 1``."
msgstr "انتساب ویژگی، دیکشنری فضای نام ماژول را بهروزرسانی میکند، برای مثال ``m.x = 1`` معادل ``m.__dict__[\"x\"] = 1`` است."
msgid "Import-related attributes on module objects"
msgstr "ویژگیهای مرتبط با ایمپورت در اشیای ماژول"
msgid "Module objects have the following attributes that relate to the :ref:`import system <importsystem>`. When a module is created using the machinery associated with the import system, these attributes are filled in based on the module's :term:`spec <module spec>`, before the :term:`loader` executes and loads the module."
msgstr "اشیای ماژول ویژگیهای زیر را دارند که به :ref:`سیستم ایمپورت <importsystem>` مربوط میشوند. هنگامی که یک ماژول با استفاده از سازوکار مرتبط با سیستم ایمپورت ایجاد میشود، این ویژگیها بر اساس :term:`spec <module spec>` ماژول پر میشوند، پیش از آنکه :term:`بارگذار <loader>` ماژول را اجرا و بارگذاری کند."
msgid "To create a module dynamically rather than using the import system, it's recommended to use :func:`importlib.util.module_from_spec`, which will set the various import-controlled attributes to appropriate values. It's also possible to use the :class:`types.ModuleType` constructor to create modules directly, but this technique is more error-prone, as most attributes must be manually set on the module object after it has been created when using this approach."
msgstr "برای ایجاد یک ماژول بهصورت پویا بهجای استفاده از سامانهی ایمپورت، توصیه میشود از :func:`importlib.util.module_from_spec` استفاده کنید، که ویژگیهای مختلف تحت کنترل ایمپورت را به مقدارهای مناسب تنظیم میکند. همچنین میتوان از سازندهی :class:`types.ModuleType` برای ایجاد مستقیم ماژولها استفاده کرد، اما این روش بیشتر خطاخیز است، زیرا هنگام استفاده از این رویکرد، بیشتر ویژگیها باید پس از ایجاد شیء ماژول، بهصورت دستی روی آن تنظیم شوند."
msgid "With the exception of :attr:`~module.__name__`, it is **strongly** recommended that you rely on :attr:`~module.__spec__` and its attributes instead of any of the other individual attributes listed in this subsection. Note that updating an attribute on :attr:`!__spec__` will not update the corresponding attribute on the module itself:"
msgstr "به استثنای :attr:`~module.__name__`، **اکیداً** توصیه میشود که بهجای هر یک از سایر ویژگیهای منفرد فهرستشده در این زیربخش، به :attr:`~module.__spec__` و ویژگیهای آن تکیه کنید. توجه داشته باشید که بهروزرسانی یک ویژگی در :attr:`!__spec__`، ویژگی متناظر در خود ماژول را بهروزرسانی نخواهد کرد:"
msgid ""
">>> import typing\n"
">>> typing.__name__, typing.__spec__.name\n"
"('typing', 'typing')\n"
">>> typing.__spec__.name = 'spelling'\n"
">>> typing.__name__, typing.__spec__.name\n"
"('typing', 'spelling')\n"
">>> typing.__name__ = 'keyboard_smashing'\n"
">>> typing.__name__, typing.__spec__.name\n"
"('keyboard_smashing', 'spelling')"
msgstr ""
">>> import typing\n"
">>> typing.__name__, typing.__spec__.name\n"
"('typing', 'typing')\n"
">>> typing.__spec__.name = 'spelling'\n"
">>> typing.__name__, typing.__spec__.name\n"
"('typing', 'spelling')\n"
">>> typing.__name__ = 'keyboard_smashing'\n"
">>> typing.__name__, typing.__spec__.name\n"
"('keyboard_smashing', 'spelling')"
msgid "The name used to uniquely identify the module in the import system. For a directly executed module, this will be set to ``\"__main__\"``."
msgstr "نامی که برای شناسایی یکتای ماژول در سیستم ایمپورت استفاده میشود. برای ماژولی که بهصورت مستقیم اجرا میشود، این نام روی ``\"__main__\"`` تنظیم خواهد شد."
msgid "This attribute must be set to the fully qualified name of the module. It is expected to match the value of :attr:`module.__spec__.name <importlib.machinery.ModuleSpec.name>`."
msgstr "این ویژگی باید روی نام کامل ماژول تنظیم شود. انتظار میرود با مقدار :attr:`module.__spec__.name <importlib.machinery.ModuleSpec.name>` مطابقت داشته باشد."
msgid "A record of the module's import-system-related state."
msgstr "رکوردی از وضعیت مرتبط با سامانهی ایمپورت ماژول."
msgid "Set to the :class:`module spec <importlib.machinery.ModuleSpec>` that was used when importing the module. See :ref:`module-specs` for more details."
msgstr "روی :class:`مشخصات ماژول <importlib.machinery.ModuleSpec>` تنظیم میشود که در هنگام ایمپورت کردن ماژول از آن استفاده شده است. برای جزئیات بیشتر، :ref:`module-specs` را ببینید."
msgid "The :term:`package` a module belongs to."
msgstr ":term:`بسته <package>`\\ ای که ماژول به آن تعلق دارد."
msgid "If the module is top-level (that is, not a part of any specific package) then the attribute should be set to ``''`` (the empty string). Otherwise, it should be set to the name of the module's package (which can be equal to :attr:`module.__name__` if the module itself is a package). See :pep:`366` for further details."
msgstr "اگر ماژول سطح بالا باشد (یعنی بخشی از هیچ بستهی مشخصی نباشد)، آنگاه این ویژگی باید روی ``''`` (رشتهی خالی) تنظیم شود. در غیر این صورت، باید روی نام بستهی ماژول تنظیم شود (که اگر خود ماژول یک بسته باشد، میتواند برابر با :attr:`module.__name__` باشد). برای جزئیات بیشتر :pep:`366` را ببینید."
msgid "This attribute is used instead of :attr:`~module.__name__` to calculate explicit relative imports for main modules. It defaults to ``None`` for modules created dynamically using the :class:`types.ModuleType` constructor; use :func:`importlib.util.module_from_spec` instead to ensure the attribute is set to a :class:`str`."
msgstr "این ویژگی بهجای :attr:`~module.__name__` برای محاسبهی ایمپورتهای نسبی صریح برای ماژولهای اصلی استفاده میشود. مقدار پیشفرض آن برای ماژولهایی که بهصورت پویا با استفاده از سازندهی :class:`types.ModuleType` ایجاد شدهاند، ``None`` است؛ در عوض از :func:`importlib.util.module_from_spec` استفاده کنید تا اطمینان حاصل شود که این ویژگی روی یک :class:`str` تنظیم شده است."
msgid "It is **strongly** recommended that you use :attr:`module.__spec__.parent <importlib.machinery.ModuleSpec.parent>` instead of :attr:`!module.__package__`. :attr:`__package__` is now only used as a fallback if :attr:`!__spec__.parent` is not set, and this fallback path is deprecated."
msgstr "**بهشدت** توصیه میشود که بهجای :attr:`!module.__package__` از :attr:`module.__spec__.parent <importlib.machinery.ModuleSpec.parent>` استفاده کنید. :attr:`__package__` اکنون تنها بهعنوان یک مسیر جایگزین در صورتی استفاده میشود که :attr:`!__spec__.parent` تنظیمنشده باشد، و این مسیر جایگزین منسوخ شده است."
msgid "This attribute now defaults to ``None`` for modules created dynamically using the :class:`types.ModuleType` constructor. Previously the attribute was optional."
msgstr "این ویژگی اکنون برای ماژولهایی که بهصورت پویا با استفاده از سازندهی :class:`types.ModuleType` ایجاد میشوند، بهطور پیشفرض ``None`` است. پیشتر این ویژگی اختیاری بود."
msgid "The value of :attr:`!__package__` is expected to be the same as :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`. :attr:`__package__` is now only used as a fallback during import resolution if :attr:`!__spec__.parent` is not defined."
msgstr "انتظار میرود مقدار :attr:`!__package__` همان :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>` باشد. اکنون اگر :attr:`!__spec__.parent` تعریف نشده باشد، :attr:`__package__` فقط بهعنوان جایگزین در فرایند حل ایمپورت استفاده میشود."
msgid ":exc:`ImportWarning` is raised if an import resolution falls back to :attr:`!__package__` instead of :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`."
msgstr "اگر تعیین ایمپورت بهجای :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>` به :attr:`!__package__` بازمیگردد، :exc:`ImportWarning` پرتاب میشود."
msgid "Raise :exc:`DeprecationWarning` instead of :exc:`ImportWarning` when falling back to :attr:`!__package__` during import resolution."
msgstr "هنگام بازگشت به :attr:`!__package__` در فرایند حل ایمپورت، بهجای :exc:`ImportWarning`، :exc:`DeprecationWarning` پرتاب کنید."
msgid ":attr:`!__package__` will cease to be set or taken into consideration by the import system or standard library."
msgstr ":attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد."
msgid "The :term:`loader` object that the import machinery used to load the module."
msgstr "شیء :term:`بارگذار <loader>` که سازوکار ایمپورت برای بارگذاری ماژول از آن استفاده کرد."
msgid "This attribute is mostly useful for introspection, but can be used for additional loader-specific functionality, for example getting data associated with a loader."
msgstr "این ویژگی بیشتر برای دروننگری مفید است، اما میتوان از آن برای قابلیتهای اضافی مختص بارگذار نیز استفاده کرد، برای مثال دریافت دادههای مرتبط با یک بارگذار."
msgid ":attr:`!__loader__` defaults to ``None`` for modules created dynamically using the :class:`types.ModuleType` constructor; use :func:`importlib.util.module_from_spec` instead to ensure the attribute is set to a :term:`loader` object."
msgstr ":attr:`!__loader__` برای ماژولهایی که بهصورت پویا با استفاده از سازندهی :class:`types.ModuleType` ایجاد شدهاند، بهطور پیشفرض ``None`` است؛ بهجای آن از :func:`importlib.util.module_from_spec` استفاده کنید تا اطمینان حاصل شود که این ویژگی به یک شیء :term:`بارگذار <loader>` تنظیم شده است."
msgid "It is **strongly** recommended that you use :attr:`module.__spec__.loader <importlib.machinery.ModuleSpec.loader>` instead of :attr:`!module.__loader__`."
msgstr "**بهشدت** توصیه میشود که بهجای :attr:`!module.__loader__`، از :attr:`module.__spec__.loader <importlib.machinery.ModuleSpec.loader>` استفاده کنید."
msgid "Setting :attr:`!__loader__` on a module while failing to set :attr:`!__spec__.loader` is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or taken into consideration by the import system or the standard library."
msgstr "تنظیم :attr:`!__loader__` روی یک ماژول در حالی که :attr:`!__spec__.loader` تنظیم نشده باشد، منسوخ است. در پایتون 3.16، :attr:`!__loader__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد."
msgid "A (possibly empty) :term:`sequence` of strings enumerating the locations where the package's submodules will be found. Non-package modules should not have a :attr:`!__path__` attribute. See :ref:`package-path-rules` for more details."
msgstr "یک :term:`دنباله <sequence>` (احتمالاً خالی) از رشتهها که محلهای یافت شدن زیرماژولهای بسته را فهرست میکند. ماژولهای غیربسته نباید ویژگی :attr:`!__path__` داشته باشند. برای جزئیات بیشتر، :ref:`package-path-rules` را ببینید."
msgid "It is **strongly** recommended that you use :attr:`module.__spec__.submodule_search_locations <importlib.machinery.ModuleSpec.submodule_search_locations>` instead of :attr:`!module.__path__`."
msgstr "**بهشدت** توصیه میشود که بهجای :attr:`!module.__path__` از :attr:`module.__spec__.submodule_search_locations <importlib.machinery.ModuleSpec.submodule_search_locations>` استفاده کنید."
msgid ":attr:`!__file__` and :attr:`!__cached__` are both optional attributes that may or may not be set. Both attributes should be a :class:`str` when they are available."
msgstr ":attr:`!__file__` و :attr:`!__cached__` هر دو ویژگیهای اختیاری هستند که ممکن است مقداردهی شده یا نشده باشند. هر دو ویژگی باید هنگامی که در دسترس باشند، یک :class:`str` باشند."
msgid ":attr:`!__file__` indicates the pathname of the file from which the module was loaded (if loaded from a file), or the pathname of the shared library file for extension modules loaded dynamically from a shared library. It might be missing for certain types of modules, such as C modules that are statically linked into the interpreter, and the :ref:`import system <importsystem>` may opt to leave it unset if it has no semantic meaning (for example, a module loaded from a database)."
msgstr ":attr:`!__file__` نام مسیر پروندهای را نشان میدهد که ماژول از آن بارگذاری شده است (اگر از یک پرونده بارگذاری شده باشد)، یا نام مسیر پرونده کتابخانه اشتراکی را برای ماژولهای توسعهای که بهصورت پویا از یک کتابخانه اشتراکی بارگذاری شدهاند. ممکن است برای انواع خاصی از ماژولها وجود نداشته باشد، مانند ماژولهای C که بهصورت ایستا در مفسر پیوند داده شدهاند، و :ref:`سیستم ایمپورت <importsystem>` ممکن است در صورتی که معنای مفهومی نداشته باشد، آن را تنظیمنشده باقی بگذارد (برای مثال، ماژولی که از یک پایگاه داده بارگذاری شده است)."
msgid "If :attr:`!__file__` is set then the :attr:`!__cached__` attribute might also be set, which is the path to any compiled version of the code (for example, a byte-compiled file). The file does not need to exist to set this attribute; the path can simply point to where the compiled file *would* exist (see :pep:`3147`)."
msgstr "اگر :attr:`!__file__` تنظیم شده باشد، ممکن است ویژگی :attr:`!__cached__` نیز تنظیم شده باشد، که مسیر هر نسخهی کامپایلشدهای از کد است (برای مثال، یک پرونده بایتکامپایلشده (byte-compiled file)). لازم نیست پرونده برای تنظیم این ویژگی وجود داشته باشد؛ مسیر میتواند صرفاً به جایی اشاره کند که پرونده کامپایلشده در آن *وجود خواهد داشت* (به :pep:`3147` مراجعه کنید)."
msgid "Note that :attr:`!__cached__` may be set even if :attr:`!__file__` is not set. However, that scenario is quite atypical. Ultimately, the :term:`loader` is what makes use of the module spec provided by the :term:`finder` (from which :attr:`!__file__` and :attr:`!__cached__` are derived). So if a loader can load from a cached module but otherwise does not load from a file, that atypical scenario may be appropriate."
msgstr "توجه داشته باشید که ممکن است :attr:`!__cached__` تنظیم شده باشد، حتی اگر :attr:`!__file__` تنظیم نشده باشد. با این حال، این حالت بسیار غیرمعمول است. در نهایت، این :term:`بارگذار <loader>` است که از مشخصات ماژول ارائهشده توسط :term:`یابنده <finder>` استفاده میکند (که :attr:`!__file__` و :attr:`!__cached__` از آن به دست میآیند). بنابراین اگر یک بارگذار بتواند از یک ماژول نهانگاهشده بارگذاری کند، ولی در غیر این صورت از یک پرونده بارگذاری نکند، آن حالت غیرمعمول ممکن است مناسب باشد."
msgid "It is **strongly** recommended that you use :attr:`module.__spec__.cached <importlib.machinery.ModuleSpec.cached>` instead of :attr:`!module.__cached__`."
msgstr "**بهشدت** توصیه میشود که شما بهجای :attr:`!module.__cached__` از :attr:`module.__spec__.cached <importlib.machinery.ModuleSpec.cached>` استفاده کنید."
msgid "Setting :attr:`!__cached__` on a module while failing to set :attr:`!__spec__.cached` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or taken into consideration by the import system or standard library."
msgstr "تنظیم :attr:`!__cached__` در یک ماژول بدون تنظیم :attr:`!__spec__.cached` منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد."
msgid "Other writable attributes on module objects"
msgstr "سایر ویژگیهای قابلنوشتن در اشیاء ماژول"
msgid "As well as the import-related attributes listed above, module objects also have the following writable attributes:"
msgstr "افزون بر ویژگیهای مرتبط با ایمپورت که در بالا فهرست شدند، اشیاء ماژول همچنین دارای ویژگیهای قابلنوشتن زیر نیز هستند:"
msgid "The module's documentation string, or ``None`` if unavailable. See also: :attr:`__doc__ attributes <definition.__doc__>`."
msgstr "رشته مستندسازی ماژول، یا ``None`` در صورت عدم دسترسی. همچنین ببینید: :attr:`__doc__ attributes <definition.__doc__>`."
msgid "A dictionary containing :term:`variable annotations <variable annotation>` collected during module body execution. For best practices on working with :attr:`!__annotations__`, see :mod:`annotationlib`."
msgstr "دیکشنری شامل :term:`حاشیهنویسیهای متغیر <variable annotation>` که در حین اجرای بدنه ماژول جمعآوری شده است. برای بهترین شیوههای کار با :attr:`!__annotations__`، :mod:`annotationlib` را ببینید."
msgid "The :term:`annotate function` for this module, or ``None`` if the module has no annotations. See also: :attr:`~object.__annotate__` attributes."
msgstr ":term:`annotate function` این ماژول، یا ``None`` اگر ماژول فاقد هرگونه حاشیهنویسی باشد. همچنین ببینید: ویژگیهای :attr:`~object.__annotate__`."
msgid "Module dictionaries"
msgstr "دیکشنریهای ماژول"
msgid "Module objects also have the following special read-only attribute:"
msgstr "اشیای ماژول همچنین دارای ویژگی خاص فقطخواندنی زیر هستند:"
msgid "The module's namespace as a dictionary object. Uniquely among the attributes listed here, :attr:`!__dict__` cannot be accessed as a global variable from within a module; it can only be accessed as an attribute on module objects."
msgstr "فضای نام ماژول بهصورت یک شیء دیکشنری. در میان ویژگیهای فهرستشده در اینجا، :attr:`!__dict__` تنها ویژگیای است که نمیتوان به آن بهعنوان یک متغیر سراسری از داخل یک ماژول دسترسی پیدا کرد؛ فقط میتوان بهعنوان یک ویژگی روی اشیای ماژول به آن دسترسی داشت."
msgid "Because of the way CPython clears module dictionaries, the module dictionary will be cleared when the module falls out of scope even if the dictionary still has live references. To avoid this, copy the dictionary or keep the module around while using its dictionary directly."
msgstr "به دلیل شیوهای که CPython دیکشنریهای ماژول را پاک میکند، دیکشنری ماژول زمانی که ماژول از محدوده خارج میشود پاک خواهد شد، حتی اگر دیکشنری هنوز دارای ارجاعهای زنده باشد. برای جلوگیری از این موضوع، دیکشنری را کپی کنید یا تا زمانی که مستقیماً از دیکشنری آن استفاده میکنید، ماژول را نگه دارید."
msgid "Custom classes"
msgstr "کلاسهای سفارشی"
msgid "Custom class types are typically created by class definitions (see section :ref:`class`). A class has a namespace implemented by a dictionary object. Class attribute references are translated to lookups in this dictionary, e.g., ``C.x`` is translated to ``C.__dict__[\"x\"]`` (although there are a number of hooks which allow for other means of locating attributes). When the attribute name is not found there, the attribute search continues in the base classes. This search of the base classes uses the C3 method resolution order which behaves correctly even in the presence of 'diamond' inheritance structures where there are multiple inheritance paths leading back to a common ancestor. Additional details on the C3 MRO used by Python can be found at :ref:`python_2.3_mro`."
msgstr "انواع کلاس سفارشی معمولاً با تعاریف کلاس ایجاد میشوند (بخش :ref:`کلاس <class>` را ببینید). هر کلاس یک فضای نام دارد که با یک شیء دیکشنری پیادهسازی شده است. ارجاعها به ویژگیهای کلاس به جستوجوهایی در این دیکشنری تبدیل میشوند، برای مثال ``C.x`` به ``C.__dict__[\"x\"]`` تبدیل میشود (اگرچه چند قلاب وجود دارند که امکان روشهای دیگری برای یافتن ویژگیها را فراهم میکنند). هنگامی که نام ویژگی در آنجا یافت نشود، جستوجوی ویژگی در کلاسهای پایه ادامه مییابد. این جستوجو در کلاسهای پایه از ترتیب حل متد C3 استفاده میکند که حتی در حضور ساختارهای وراثت «الماسی» (diamond) که در آنها چندین مسیر وراثت به یک جد مشترک بازمیگردند، بهدرستی رفتار میکند. جزئیات بیشتر دربارهی C3 MRO مورد استفاده در پایتون را میتوان در :ref:`python_2.3_mro` یافت."
msgid "When a class attribute reference (for class :class:`!C`, say) would yield a class method object, it is transformed into an instance method object whose :attr:`~method.__self__` attribute is :class:`!C`. When it would yield a :class:`staticmethod` object, it is transformed into the object wrapped by the static method object. See section :ref:`descriptors` for another way in which attributes retrieved from a class may differ from those actually contained in its :attr:`~object.__dict__`."
msgstr "هرگاه ارجاع به یک ویژگی کلاس (مثلاً برای کلاس :class:`!C`) قرار باشد یک شیء متد کلاس بازگرداند، آن شیء به یک شیء متد نمونه تبدیل میشود که ویژگی :attr:`~method.__self__` آن :class:`!C` است. هرگاه قرار باشد یک شیء :class:`staticmethod` بازگرداند، آن شیء به شیئی تبدیل میشود که شیء متد ایستا آن را دربرگرفته است. برای حالت دیگری که در آن ویژگیهای بازیابیشده از یک کلاس ممکن است با ویژگیهایی که واقعاً در :attr:`~object.__dict__` آن قرار دارند متفاوت باشند، بخش :ref:`descriptors` را ببینید."
msgid "Class attribute assignments update the class's dictionary, never the dictionary of a base class."
msgstr "انتسابهای ویژگی کلاس، دیکشنری کلاس را بهروزرسانی میکنند و هرگز دیکشنری یک کلاس پایه را بهروزرسانی نمیکنند."
msgid "A class object can be called (see above) to yield a class instance (see below)."
msgstr "میتوان یک شیء کلاس را فراخوانی کرد (به بالا مراجعه کنید) تا یک نمونه کلاس حاصل شود (به پایین مراجعه کنید)."
msgid "Special attributes"
msgstr "ویژگیهای خاص"
msgid "The class's name. See also: :attr:`__name__ attributes <definition.__name__>`."
msgstr "نام کلاس. همچنین ببینید: :attr:`ویژگیهای __name__ <definition.__name__>`."
msgid "The class's :term:`qualified name`. See also: :attr:`__qualname__ attributes <definition.__qualname__>`."
msgstr ":term:`نام کامل <qualified name>` کلاس. همچنین ببینید: :attr:`ویژگیهای __qualname__ <definition.__qualname__>`."
msgid "The name of the module in which the class was defined."
msgstr "نام ماژولی که کلاس در آن تعریف شده است."
msgid "A :class:`mapping proxy <types.MappingProxyType>` providing a read-only view of the class's namespace. See also: :attr:`__dict__ attributes <object.__dict__>`."
msgstr "یک :class:`پراکسی نگاشت (mapping proxy) <types.MappingProxyType>` که نمایی فقطخواندنی از فضای نام کلاس فراهم میکند. همچنین ببینید: :attr:`ویژگیهای __dict__ <object.__dict__>`."
msgid "A :class:`tuple` containing the class's bases. In most cases, for a class defined as ``class X(A, B, C)``, ``X.__bases__`` will be exactly equal to ``(A, B, C)``."
msgstr "یک :class:`tuple` شامل پایههای کلاس. در بیشتر موارد، برای کلاسی که بهصورت ``class X(A, B, C)`` تعریف شده باشد، ``X.__bases__`` دقیقاً برابر با ``(A, B, C)`` خواهد بود."
msgid "The single base class in the inheritance chain that is responsible for the memory layout of instances. This attribute corresponds to :c:member:`~PyTypeObject.tp_base` at the C level."
msgstr "تنها کلاس پایه در زنجیره وراثت که مسئول چیدمان حافظه نمونهها است. این ویژگی در سطح C با :c:member:`~PyTypeObject.tp_base` متناظر است."
msgid "The class's documentation string, or ``None`` if undefined. Not inherited by subclasses."
msgstr "رشتهی مستندسازی کلاس، یا ``None`` اگر تعریفنشده باشد. در زیرکلاسها به ارث برده نمیشود."
msgid "A dictionary containing :term:`variable annotations <variable annotation>` collected during class body execution. See also: :attr:`__annotations__ attributes <object.__annotations__>`."
msgstr "دیکشنری حاوی :term:`حاشیهنویسیهای متغیر <variable annotation>` که در طول اجرای بدنه کلاس جمعآوری شدهاند. همچنین ببینید: :attr:`__annotations__ attributes <object.__annotations__>`."
msgid "For best practices on working with :attr:`~object.__annotations__`, please see :mod:`annotationlib`. Use :func:`annotationlib.get_annotations` instead of accessing this attribute directly."
msgstr "برای بهترین روشهای کار با :attr:`~object.__annotations__`، لطفاً :mod:`annotationlib` را ببینید. به جای دسترسی مستقیم به این ویژگی، از :func:`annotationlib.get_annotations` استفاده کنید."
msgid "Accessing the :attr:`!__annotations__` attribute directly on a class object may return annotations for the wrong class, specifically in certain cases where the class, its base class, or a metaclass is defined under ``from __future__ import annotations``. See :pep:`749 <749#pep749-metaclasses>` for details."
msgstr "دسترسی مستقیم به ویژگی :attr:`!__annotations__` بر روی یک شیء کلاس ممکن است حاشیهنویسیهایی برای کلاس نادرست را برگرداند، بهویژه در موارد خاصی که کلاس، کلاس پایهی آن، یا یک فراکلاس با ``from __future__ import annotations`` تعریف شده باشد. برای جزئیات :pep:`749 <749#pep749-metaclasses>` را ببینید."
msgid "This attribute does not exist on certain builtin classes. On user-defined classes without ``__annotations__``, it is an empty dictionary."
msgstr "این ویژگی در برخی کلاسهای توکار وجود ندارد. در کلاسهای تعریفشده توسط کاربر بدون ``__annotations__``، این ویژگی یک دیکشنری خالی است."
msgid "The :term:`annotate function` for this class, or ``None`` if the class has no annotations. See also: :attr:`__annotate__ attributes <object.__annotate__>`."
msgstr ":term:`annotate function` برای این کلاس، یا در صورتی که این کلاس annotation نداشته باشد، ``None``. همچنین ببینید: :attr:`ویژگیهای __annotate__ <object.__annotate__>`."
msgid "A :class:`tuple` containing the :ref:`type parameters <type-params>` of a :ref:`generic class <generic-classes>`."
msgstr "یک :class:`tuple` شامل :ref:`پارامترهای نوع <type-params>` یک :ref:`کلاس عام <generic-classes>`."
msgid "A :class:`tuple` containing names of attributes of this class which are assigned through ``self.X`` from any function in its body."
msgstr "یک :class:`tuple` شامل نام ویژگیهایی از این کلاس است که توسط هر تابعی در بدنهی آن از طریق ``self.X`` اختصاص داده میشوند."
msgid "The line number of the first line of the class definition, including decorators. Setting the :attr:`~type.__module__` attribute removes the :attr:`!__firstlineno__` item from the type's dictionary."
msgstr "شمارهی خط نخستِ تعریف کلاس، از جمله دکوراتورها. تنظیم ویژگی :attr:`~type.__module__`، آیتم :attr:`!__firstlineno__` را از دیکشنری نوع حذف میکند."
msgid "The :class:`tuple` of classes that are considered when looking for base classes during method resolution."
msgstr ":class:`tuple` از کلاسهایی که هنگام جستوجوی کلاسهای پایه در حین حل متد در نظر گرفته میشوند."
msgid "Special methods"
msgstr "متدهای ویژه"
msgid "In addition to the special attributes described above, all Python classes also have the following two methods available:"
msgstr "علاوه بر ویژگیهای ویژهای که در بالا شرح داده شد، دو متد زیر نیز برای تمام کلاسهای پایتون در دسترس است:"
msgid "This method can be overridden by a metaclass to customize the method resolution order for its instances. It is called at class instantiation, and its result is stored in :attr:`~type.__mro__`."
msgstr "یک فراکلاس میتواند این متد را بازنویسی کند تا ترتیب حل متد برای نمونههای آن سفارشیسازی شود. این متد در هنگام نمونهسازی از کلاس فراخوانی میشود، و نتیجهی آن در :attr:`~type.__mro__` ذخیره میشود."
msgid "Each class keeps a list of weak references to its immediate subclasses. This method returns a list of all those references still alive. The list is in definition order. Example:"
msgstr "هر کلاس فهرستی از ارجاعهای ضعیف به زیرکلاسهای مستقیم خود نگه میدارد. این متد فهرستی از تمام آن ارجاعهایی که هنوز زنده هستند را برمیگرداند. این فهرست به ترتیب تعریف است. مثال:"
msgid ""
">>> class A: pass\n"
">>> class B(A): pass\n"
">>> A.__subclasses__()\n"
"[<class 'B'>]"
msgstr ""
">>> class A: pass\n"
">>> class B(A): pass\n"
">>> A.__subclasses__()\n"
"[<class 'B'>]"
msgid "Class instances"
msgstr "نمونههای کلاس"
msgid "A class instance is created by calling a class object (see above). A class instance has a namespace implemented as a dictionary which is the first place in which attribute references are searched. When an attribute is not found there, and the instance's class has an attribute by that name, the search continues with the class attributes. If a class attribute is found that is a user-defined function object, it is transformed into an instance method object whose :attr:`~method.__self__` attribute is the instance. Static method and class method objects are also transformed; see above under \"Classes\". See section :ref:`descriptors` for another way in which attributes of a class retrieved via its instances may differ from the objects actually stored in the class's :attr:`~object.__dict__`. If no class attribute is found, and the object's class has a :meth:`~object.__getattr__` method, that is called to satisfy the lookup."
msgstr "یک نمونه کلاس با فراخوانی یک شیء کلاس ایجاد میشود. یک نمونه کلاس دارای یک فضای نام است که بهصورت یک دیکشنری پیادهسازی شده است و نخستین مکانی است که ارجاعهای به ویژگی در آن جستجو میشوند. هنگامی که یک ویژگی در آنجا پیدا نشود و کلاس نمونه دارای ویژگیای با آن نام باشد، جستجو با ویژگیهای کلاس ادامه مییابد. اگر یک ویژگی کلاس پیدا شود که یک شیء تابع تعریفشده توسط کاربر باشد، آن به یک شیء متد نمونه تبدیل میشود که ویژگی :attr:`~method.__self__` آن همان نمونه است. اشیاء متد ایستا و متد کلاس نیز تبدیل میشوند؛ در بالا، ذیل «کلاسها» را ببینید. برای راه دیگری که در آن ویژگیهای یک کلاس که از طریق نمونههای آن بازیابی میشوند ممکن است با اشیایی که واقعاً در :attr:`~object.__dict__` کلاس ذخیره شدهاند متفاوت باشند، بخش :ref:`descriptors` را ببینید. اگر هیچ ویژگی کلاس پیدا نشود و کلاس شیء دارای متد :meth:`~object.__getattr__` باشد، آن متد برای برآورده کردن جستجو فراخوانی میشود."
msgid "Attribute assignments and deletions update the instance's dictionary, never a class's dictionary. If the class has a :meth:`~object.__setattr__` or :meth:`~object.__delattr__` method, this is called instead of updating the instance dictionary directly."
msgstr "انتسابها و حذفهای ویژگی، دیکشنری نمونه را بهروزرسانی میکنند و هرگز دیکشنری کلاس را بهروزرسانی نمیکنند. اگر کلاس متد :meth:`~object.__setattr__` یا :meth:`~object.__delattr__` داشته باشد، این متد بهجای بهروزرسانی مستقیم دیکشنری نمونه فراخوانی میشود."
msgid "Class instances can pretend to be numbers, sequences, or mappings if they have methods with certain special names. See section :ref:`specialnames`."
msgstr "نمونههای کلاس میتوانند در صورت داشتن متدهایی با نامهای خاص معین، مانند اعداد، دنبالهها یا نگاشتها رفتار کنند. به بخش :ref:`specialnames` مراجعه کنید."
msgid "The class to which a class instance belongs."
msgstr "کلاسی که یک نمونهی کلاس به آن تعلق دارد."
msgid "A dictionary or other mapping object used to store an object's (writable) attributes. Not all instances have a :attr:`!__dict__` attribute; see the section on :ref:`slots` for more details."
msgstr "دیکشنری یا شیء نگاشت دیگری که برای ذخیره ویژگیهای (قابل نوشتن) یک شیء استفاده میشود. همه نمونهها دارای ویژگی :attr:`!__dict__` نیستند؛ برای جزئیات بیشتر، بخش :ref:`slots` را ببینید."
msgid "I/O objects (also known as file objects)"
msgstr "اشیای ورودی/خروجی (که به اشیای پرونده نیز شناخته میشوند)"
msgid "A :term:`file object` represents an open file. Various shortcuts are available to create file objects: the :func:`open` built-in function, and also :func:`os.popen`, :func:`os.fdopen`, and the :meth:`~socket.socket.makefile` method of socket objects (and perhaps by other functions or methods provided by extension modules)."
msgstr "یک :term:`file object` نمایانگر یک پرونده باز است. میانبرهای مختلفی برای ایجاد اشیای پرونده در دسترس است: تابع توکار :func:`open`، و همچنین :func:`os.popen`، :func:`os.fdopen` و متد :meth:`~socket.socket.makefile` از اشیای سوکت (و شاید نیز از طریق سایر توابع یا متدهای ارائهشده توسط ماژولهای توسعه)."
msgid "File objects implement common methods, listed below, to simplify usage in generic code. They are expected to be :ref:`context-managers`."
msgstr "اشیاء پرونده متدهای رایجی را که در زیر فهرست شدهاند، پیادهسازی میکنند تا استفاده در کد عام سادهتر شود. انتظار میرود که :ref:`context-managers` باشند."
msgid "The objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are initialized to file objects corresponding to the interpreter's standard input, output and error streams; they are all open in text mode and therefore follow the interface defined by the :class:`io.TextIOBase` abstract class."
msgstr "اشیاء ``sys.stdin``، ``sys.stdout`` و ``sys.stderr`` به اشیاء پروندهای متناظر با جریانهای ورودی، خروجی و خطای استاندارد مفسر مقداردهی اولیه میشوند؛ همهی آنها در حالت متنی باز هستند و بنابراین از رابط تعریفشده توسط کلاس انتزاعی :class:`io.TextIOBase` پیروی میکنند."
msgid "Retrieve up to *size* data from the file. As a convenience if *size* is unspecified or -1 retrieve all data available."
msgstr "حداکثر بهاندازهی *size* داده از پرونده بازیابی میشود. برای سهولت، اگر *size* مشخصنشده باشد یا -1 باشد، تمام دادههای موجود بازیابی میشود."
msgid "Store *data* to the file."
msgstr "*data* را در پرونده ذخیره کنید."
msgid "Flush any buffers and close the underlying file."
msgstr "هر بافری را تخلیه کنید و پرونده زیربنایی را ببندید."
msgid "Internal types"
msgstr "انواع داخلی"
msgid "A few types used internally by the interpreter are exposed to the user. Their definitions may change with future versions of the interpreter, but they are mentioned here for completeness."
msgstr "چند نوع که بهصورت داخلی توسط مفسر استفاده میشوند، در دسترس کاربر قرار میگیرند. تعریف آنها ممکن است در نسخههای آینده مفسر تغییر کند، اما برای کامل بودن در اینجا ذکر شدهاند."
msgid "Code objects"
msgstr "اشیاء کد"
msgid "Code objects represent *byte-compiled* executable Python code, or :term:`bytecode`. The difference between a code object and a function object is that the function object contains an explicit reference to the function's globals (the module in which it was defined), while a code object contains no context; also the default argument values are stored in the function object, not in the code object (because they represent values calculated at run-time). Unlike function objects, code objects are immutable and contain no references (directly or indirectly) to mutable objects."
msgstr "اشیای کد نشاندهنده کد پایتون قابلاجرای *بایتکامپایلشده*، یا :term:`بایتکد <bytecode>` هستند. تفاوت میان یک شیء کد و یک شیء تابع این است که شیء تابع شامل یک ارجاع صریح به سراسریهای تابع (ماژولی که تابع در آن تعریف شده است) است، در حالی که شیء کد حاوی هیچ زمینهای نیست؛ همچنین مقادیر پیشفرض آرگومانها در شیء تابع ذخیره میشوند، نه در شیء کد (زیرا نشاندهنده مقادیری هستند که در رانتایم محاسبه میشوند). برخلاف اشیای تابع، اشیای کد تغییرناپذیرند و هیچ ارجاعی (مستقیم یا غیرمستقیم) به اشیای تغییرپذیر ندارند."
msgid "The function name"
msgstr "نام تابع"
msgid "The fully qualified function name"
msgstr "نام کامل تابع"
msgid "The total number of positional :term:`parameters <parameter>` (including positional-only parameters and parameters with default values) that the function has"
msgstr "تعداد کل :term:`پارامترهای <parameter>` جایگاهی تابع (شامل پارامترهای فقط جایگاهی و پارامترهای دارای مقادیر پیشفرض)"
msgid "The number of positional-only :term:`parameters <parameter>` (including arguments with default values) that the function has"
msgstr "تعداد :term:`پارامترهای <parameter>` فقط جایگاهی تابع (از جمله آرگومانهای دارای مقادیر پیشفرض)"
msgid "The number of keyword-only :term:`parameters <parameter>` (including arguments with default values) that the function has"
msgstr "تعداد :term:`پارامترهای فقط کلیدواژهای <parameter>` تابع (شامل آرگومانهای دارای مقادیر پیشفرض)"
msgid "The number of :ref:`local variables <naming>` used by the function (including parameters)"
msgstr "تعداد :ref:`متغیرهای محلی <naming>` استفادهشده در تابع (شامل پارامترها)"
msgid "A :class:`tuple` containing the names of the local variables in the function (starting with the parameter names)"
msgstr "یک :class:`tuple` شامل نامهای متغیرهای محلی در تابع (که با نام پارامترها شروع میشود)"
msgid "A :class:`tuple` containing the names of :ref:`local variables <naming>` that are referenced from at least one :term:`nested scope` inside the function"
msgstr "یک :class:`tuple` شامل نامهای :ref:`متغیرهای محلی <naming>` که از حداقل یک :term:`محدوده تودرتو <nested scope>` درون تابع به آنها ارجاع داده شده است"
msgid "A :class:`tuple` containing the names of :term:`free (closure) variables <closure variable>` that a :term:`nested scope` references in an outer scope. See also :attr:`function.__closure__`."
msgstr "یک :class:`tuple` شامل نامهای :term:`متغیرهای آزاد (بستار) <closure variable>` است که یک :term:`محدوده تودرتو <nested scope>` در یک محدوده بیرونی به آنها ارجاع میدهد. همچنین :attr:`function.__closure__` را ببینید."
msgid "Note: references to global and builtin names are *not* included."
msgstr "توجه: ارجاعها به نامهای سراسری و توکار *گنجانده نشدهاند*."
msgid "A string representing the sequence of :term:`bytecode` instructions in the function"
msgstr "رشتهای که نشاندهندهی دنبالهی دستورالعملهای :term:`بایتکد <bytecode>` در تابع است"
msgid "A :class:`tuple` containing the literals used by the :term:`bytecode` in the function"
msgstr "یک :class:`tuple` شامل مقادیر لفظی استفادهشده در :term:`بایتکد <bytecode>` تابع"
msgid "A :class:`tuple` containing the names used by the :term:`bytecode` in the function"
msgstr "یک :class:`tuple` شامل نامهایی که توسط :term:`بایتکد <bytecode>` در تابع استفاده میشوند"
msgid "The name of the file from which the code was compiled"
msgstr "نام پروندهای که کد از آن کامپایل شده است"
msgid "The line number of the first line of the function"
msgstr "شمارهی اولین خط تابع"
msgid "A string encoding the mapping from :term:`bytecode` offsets to line numbers. For details, see the source code of the interpreter."
msgstr "رشتهای که نگاشت از آفستهای :term:`بایتکد <bytecode>` به شمارههای خط را کدگذاری میکند. برای جزئیات، به کد منبع مفسر مراجعه کنید."
msgid "This attribute of code objects is deprecated, and may be removed in Python 3.15."
msgstr "این ویژگی از اشیای کد منسوخ شده است و ممکن است در پایتون 3.15 حذف شود."
msgid "A :class:`bytes` object containing encoded source location information. The exact format is an implementation detail and may change between Python versions. Use :meth:`~codeobject.co_lines` and :meth:`~codeobject.co_positions` for supported access to line and position information. To create a modified copy of a code object, use :meth:`~codeobject.replace`."
msgstr "یک شیء :class:`bytes` حاوی اطلاعات مکانِ منبع کدگذاریشده. فرمت دقیق یک جزئیات پیادهسازی است و ممکن است بین نسخههای پایتون تغییر کند. برای دسترسی پشتیبانیشده به اطلاعات سطر و موقعیت، از :meth:`~codeobject.co_lines` و :meth:`~codeobject.co_positions` استفاده کنید. برای ایجاد یک کپی اصلاحشده از یک شیء کد، از :meth:`~codeobject.replace` استفاده کنید."
msgid "The required stack size of the code object"
msgstr "اندازهی پشتهی مورد نیاز شیء کد"
msgid "An :class:`integer <int>` encoding a number of flags for the interpreter."
msgstr "یک :class:`integer <int>` که تعدادی از پرچمهای مفسر را کدگذاری میکند."
msgid "The following flag bits are defined for :attr:`~codeobject.co_flags`: bit ``0x04`` is set if the function uses the ``*arguments`` syntax to accept an arbitrary number of positional arguments; bit ``0x08`` is set if the function uses the ``**keywords`` syntax to accept arbitrary keyword arguments; bit ``0x20`` is set if the function is a generator. See :ref:`inspect-module-co-flags` for details on the semantics of each flags that might be present."
msgstr "بیتهای پرچم زیر برای :attr:`~codeobject.co_flags` تعریف شدهاند: در صورتی که تابع از سینتکس ``*arguments`` برای پذیرش تعداد دلخواهی از آرگومانهای جایگاهی استفاده کند، بیت ``0x04`` تنظیم میشود؛ در صورتی که تابع از سینتکس ``**keywords`` برای پذیرش آرگومانهای کلیدواژهای دلخواه استفاده کند، بیت ``0x08`` تنظیم میشود؛ در صورتی که تابع یک تولیدگر باشد، بیت ``0x20`` تنظیم میشود. برای جزئیات دربارهی معنای هر پرچمی که ممکن است وجود داشته باشد، به :ref:`inspect-module-co-flags` مراجعه کنید."
msgid "Future feature declarations (for example, ``from __future__ import division``) also use bits in :attr:`~codeobject.co_flags` to indicate whether a code object was compiled with a particular feature enabled. See :attr:`~__future__._Feature.compiler_flag`."
msgstr "اعلامیههای ویژگیهای آینده (برای مثال، ``from __future__ import division``) همچنین از بیتهایی در :attr:`~codeobject.co_flags` استفاده میکنند تا نشان دهند آیا یک شیء کد با فعال بودن یک ویژگی خاص کامپایل شده است یا خیر. :attr:`~__future__._Feature.compiler_flag` را ببینید."
msgid "Other bits in :attr:`~codeobject.co_flags` are reserved for internal use."
msgstr "سایر بیتها در :attr:`~codeobject.co_flags` برای استفادهی داخلی محفوظ هستند."
msgid "If a code object represents a function and has a docstring, the :data:`~inspect.CO_HAS_DOCSTRING` bit is set in :attr:`~codeobject.co_flags` and the first item in :attr:`~codeobject.co_consts` is the docstring of the function."
msgstr "اگر یک شیء کد نمایانگر یک تابع باشد و دارای یک رشته مستندسازی باشد، بیت :data:`~inspect.CO_HAS_DOCSTRING` در :attr:`~codeobject.co_flags` تنظیم میشود و اولین آیتم در :attr:`~codeobject.co_consts`، رشته مستندسازی تابع است."
msgid "Methods on code objects"
msgstr "متدهای اشیای کد"
msgid "Returns an iterable over the source code positions of each :term:`bytecode` instruction in the code object."
msgstr "یک پیمایشپذیر بر روی موقعیتهای کد منبع هر دستور :term:`بایتکد <bytecode>` در شیء کد برمیگرداند."
msgid "The iterator returns :class:`tuple`\\s containing the ``(start_line, end_line, start_column, end_column)``. The *i-th* tuple corresponds to the position of the source code that compiled to the *i-th* code unit. Column information is 0-indexed utf-8 byte offsets on the given source line."
msgstr "این پیمایشگر :class:`tuple`\\s شامل ``(start_line, end_line, start_column, end_column)`` را برمیگرداند. تاپل *i-ام* متناظر با موقعیت کد منبعی است که به واحد کد *i-ام* کامپایل شده است. اطلاعات ستون، آفستهای بایتی utf-8 با اندیسگذاری از ۰ در خط منبع دادهشده است."
msgid "This positional information can be missing. A non-exhaustive lists of cases where this may happen:"
msgstr "این اطلاعات جایگاهی ممکن است وجود نداشته باشد. فهرستی غیرجامع از مواردی که ممکن است این اتفاق بیفتد:"
msgid "Running the interpreter with :option:`-X` ``no_debug_ranges``."
msgstr "اجرای مفسر با :option:`-X` ``no_debug_ranges``."
msgid "Loading a pyc file compiled while using :option:`-X` ``no_debug_ranges``."
msgstr "بارگذاری یک پرونده pyc که هنگام استفاده از :option:`-X` ``no_debug_ranges`` کامپایل شده است."
msgid "Position tuples corresponding to artificial instructions."
msgstr "تاپلهای موقعیت متناظر با دستورالعملهای مصنوعی."
msgid "Line and column numbers that can't be represented due to implementation specific limitations."
msgstr "شمارههای خط و ستونی که به دلیل محدودیتهای خاص پیادهسازی نمیتوانند بازنمایی شوند."
msgid "When this occurs, some or all of the tuple elements can be :const:`None`."
msgstr "هنگامی که این اتفاق میافتد، برخی یا همهی عناصر تاپل میتوانند :const:`None` باشند."
msgid "This feature requires storing column positions in code objects which may result in a small increase of disk usage of compiled Python files or interpreter memory usage. To avoid storing the extra information and/or deactivate printing the extra traceback information, the :option:`-X` ``no_debug_ranges`` command line flag or the :envvar:`PYTHONNODEBUGRANGES` environment variable can be used."
msgstr "این قابلیت نیازمند ذخیرهسازی موقعیتهای ستون در اشیای کد است که ممکن است منجر به افزایش جزئی مصرف دیسک پروندههای پایتون کامپایلشده یا مصرف حافظه مفسر شود. برای اجتناب از ذخیرهسازی اطلاعات اضافی و/یا غیرفعال کردن چاپ اطلاعات اضافی ردگیری پشته، میتوان از پرچم خط فرمان :option:`-X` ``no_debug_ranges`` یا متغیر محیطی :envvar:`PYTHONNODEBUGRANGES` استفاده کرد."
msgid "Returns an iterator that yields information about successive ranges of :term:`bytecode`\\s. Each item yielded is a ``(start, end, lineno)`` :class:`tuple`:"
msgstr "یک پیمایشگر برمیگرداند که اطلاعاتی را دربارهی بازههای متوالی :term:`بایتکد <bytecode>`\\s تولید میکند. هر آیتم تولیدشده یک :class:`tuple` بهصورت ``(start, end, lineno)`` است:"
msgid "``start`` (an :class:`int`) represents the offset (inclusive) of the start of the :term:`bytecode` range"
msgstr "``start`` (یک :class:`int`) آفست شروع محدودهی :term:`بایتکد <bytecode>` را نشان میدهد (این آفست شامل خود مقدار است)"
msgid "``end`` (an :class:`int`) represents the offset (exclusive) of the end of the :term:`bytecode` range"
msgstr "``end`` (یک :class:`int`) آفست (غیرشامل) پایان محدودهی :term:`بایتکد <bytecode>` را نشان میدهد"
msgid "``lineno`` is an :class:`int` representing the line number of the :term:`bytecode` range, or ``None`` if the bytecodes in the given range have no line number"
msgstr "``lineno`` یک :class:`int` است که شمارهی خط محدودهی :term:`بایتکد <bytecode>` را نشان میدهد، یا اگر بایتکدهای محدودهی دادهشده شمارهی سطری نداشته باشند، ``None`` است"
msgid "The items yielded will have the following properties:"
msgstr "آیتمهای تولیدشده ویژگیهای زیر را خواهند داشت:"
msgid "The first range yielded will have a ``start`` of 0."
msgstr "اولین بازهی تولیدشده دارای ``start`` برابر با ۰ خواهد بود."
msgid "The ``(start, end)`` ranges will be non-decreasing and consecutive. That is, for any pair of :class:`tuple`\\s, the ``start`` of the second will be equal to the ``end`` of the first."
msgstr "بازههای ``(start, end)`` غیرنزولی و متوالی خواهند بود. یعنی برای هر جفت :class:`tuple`\\s، ``start`` دومی برابر با ``end`` اولی خواهد بود."
msgid "No range will be backwards: ``end >= start`` for all triples."
msgstr "هیچ بازهای معکوس نخواهد بود: در تمام سهتاییها ``end >= start`` است."
msgid "The last :class:`tuple` yielded will have ``end`` equal to the size of the :term:`bytecode`."
msgstr "آخرین :class:`tuple` تولیدشده دارای ``end`` برابر با اندازهی :term:`بایتکد <bytecode>` خواهد بود."
msgid "Zero-width ranges, where ``start == end``, are allowed. Zero-width ranges are used for lines that are present in the source code, but have been eliminated by the :term:`bytecode` compiler."
msgstr "بازههای با عرض صفر، که در آنها ``start == end`` است، مجاز هستند. بازههای با عرض صفر برای سطرهایی استفاده میشوند که در کد منبع وجود دارند، اما توسط کامپایلر :term:`بایتکد <bytecode>` حذف شدهاند."
msgid ":pep:`626` - Precise line numbers for debugging and other tools."
msgstr ":pep:`626` - شمارههای خط دقیق برای اشکالزدایی و سایر ابزارها."
msgid "The PEP that introduced the :meth:`!co_lines` method."
msgstr "PEP معرفیکنندهی متد :meth:`!co_lines`."
msgid "Return a copy of the code object with new values for the specified fields."
msgstr "یک کپی از شیء کد با مقادیر جدید برای فیلدهای مشخصشده برمیگرداند."
msgid "Code objects are also supported by the generic function :func:`copy.replace`."
msgstr "تابع عام :func:`copy.replace` نیز از اشیای کد پشتیبانی میکند."
msgid "Frame objects"
msgstr "اشیای فریم"
msgid "Frame objects represent execution frames. They may occur in :ref:`traceback objects <traceback-objects>`, and are also passed to registered trace functions."
msgstr "اشیاء فریم نشاندهندهی فریمهای اجرا هستند. این اشیاء ممکن است در :ref:`اشیاء ردگیری پشته <traceback-objects>` ظاهر شوند و همچنین به توابع ردگیری ثبتشده ارسال شوند."
msgid "Points to the previous stack frame (towards the caller), or ``None`` if this is the bottom stack frame"
msgstr "به فریم پشتهی قبلی اشاره میکند (به سمت فراخواننده)، یا اگر این پایینترین فریم پشته باشد، ``None`` است"
msgid "The :ref:`code object <code-objects>` being executed in this frame. Accessing this attribute raises an :ref:`auditing event <auditing>` ``object.__getattr__`` with arguments ``obj`` and ``\"f_code\"``."
msgstr ":ref:`شیء کد <code-objects>` در حال اجرا در این فریم. دسترسی به این ویژگی، یک :ref:`رویداد حسابرسی <auditing>` ``object.__getattr__`` را با آرگومانهای ``obj`` و ``\"f_code\"`` پرتاب میکند."
msgid "The mapping used by the frame to look up :ref:`local variables <naming>`. If the frame refers to an :term:`optimized scope`, this may return a write-through proxy object."
msgstr "نگاشتی که فریم برای جستوجوی :ref:`متغیرهای محلی <naming>` از آن استفاده میکند. اگر فریم به یک :term:`محدوده بهینهشده <optimized scope>` اشاره کند، ممکن است یک شیء پراکسی با نوشتنهمزمان (write-through) برگردانده شود."
msgid "Return a proxy for optimized scopes."
msgstr "یک پراکسی برای محدودههای بهینهشده بازمیگرداند."
msgid "The dictionary used by the frame to look up :ref:`global variables <naming>`"
msgstr "دیکشنری استفادهشده توسط فریم برای جستجوی :ref:`متغیرهای سراسری <naming>`"
msgid "The dictionary used by the frame to look up :ref:`built-in (intrinsic) names <naming>`"
msgstr "دیکشنری مورد استفاده فریم برای جستجوی :ref:`نامهای توکار (ذاتی) <naming>`"
msgid "The \"precise instruction\" of the frame object (this is an index into the :term:`bytecode` string of the :ref:`code object <code-objects>`)"
msgstr "«دستورالعمل دقیق» شیء فریم (این اندیسی در رشتهی :term:`بایتکد <bytecode>` :ref:`شیء کد <code-objects>` است)"
msgid "The :term:`generator` or :term:`coroutine` object that owns this frame, or ``None`` if the frame is a normal function."
msgstr "شیء :term:`تولیدگر <generator>` یا :term:`همروال <coroutine>` که مالک این فریم است، یا ``None`` اگر فریم یک تابع معمولی باشد."
msgid "If not ``None``, this is a function called for various events during code execution (this is used by debuggers). Normally an event is triggered for each new source line (see :attr:`~frame.f_trace_lines`)."
msgstr "اگر ``None`` نباشد، این یک تابع است که برای رویدادهای مختلف در حین اجرای کد فراخوانی میشود (این مورد توسط اشکالزداها استفاده میشود). معمولاً برای هر خط منبع جدید، یک رویداد فعال میشود (به :attr:`~frame.f_trace_lines` مراجعه کنید)."
msgid "Set this attribute to :const:`False` to disable triggering a tracing event for each source line."
msgstr "این ویژگی را روی :const:`False` تنظیم کنید تا راهاندازی یک رویداد ردگیری برای هر خط منبع غیرفعال شود."
msgid "Set this attribute to :const:`True` to allow per-opcode events to be requested. Note that this may lead to undefined interpreter behaviour if exceptions raised by the trace function escape to the function being traced."
msgstr "این ویژگی را روی :const:`True` تنظیم کنید تا امکان درخواست رویدادهای بهازای هر opcode فراهم شود. توجه داشته باشید که اگر استثناهای پرتابشده توسط تابع ردگیری به تابع در حال ردگیری راه یابند، ممکن است به رفتار تعریفنشدهی مفسر منجر شود."
msgid "The current line number of the frame -- writing to this from within a trace function jumps to the given line (only for the bottom-most frame). A debugger can implement a Jump command (aka Set Next Statement) by writing to this attribute."
msgstr "شماره خط جاری فریم — نوشتن در آن از درون یک تابع ردگیری (trace function)، باعث پرش به خط دادهشده میشود (فقط برای پایینترین فریم). یک اشکالزدا میتواند با نوشتن در این ویژگی، یک دستور Jump (معروف به Set Next Statement) را پیادهسازی کند."
msgid "Frame object methods"
msgstr "متدهای شیء فریم"
msgid "Frame objects support one method:"
msgstr "اشیای فریم از یک متد پشتیبانی میکنند:"
msgid "This method clears all references to :ref:`local variables <naming>` held by the frame. Also, if the frame belonged to a :term:`generator`, the generator is finalized. This helps break reference cycles involving frame objects (for example when catching an :ref:`exception <bltin-exceptions>` and storing its :ref:`traceback <traceback-objects>` for later use)."
msgstr "این متد تمام ارجاعها به :ref:`متغیرهای محلی <naming>` را که فریم نگهداری میکند، پاک میکند. همچنین، اگر فریم به یک :term:`تولیدگر <generator>` تعلق داشته باشد، تولیدگر نهاییسازی میشود. این کار به شکستن چرخههای ارجاع شامل اشیاء فریم کمک میکند (برای مثال هنگام گرفتن یک :ref:`استثنا <bltin-exceptions>` و ذخیرهی :ref:`ردگیری پشته <traceback-objects>` آن برای استفادهی بعدی)."
msgid ":exc:`RuntimeError` is raised if the frame is currently executing or suspended."
msgstr "اگر فریم در حال حاضر در حال اجرا یا معلق باشد، :exc:`RuntimeError` پرتاب میشود."
msgid "Attempting to clear a suspended frame raises :exc:`RuntimeError` (as has always been the case for executing frames)."
msgstr "تلاش برای پاکسازی یک فریم معلق، باعث پرتاب :exc:`RuntimeError` میشود (همانگونه که همواره در مورد فریمهای در حال اجرا نیز صادق بوده است)."
msgid "Traceback objects"
msgstr "اشیای ردگیری پشته"
msgid "Traceback objects represent the stack trace of an :ref:`exception <tut-errors>`. A traceback object is implicitly created when an exception occurs, and may also be explicitly created by calling :class:`types.TracebackType`."
msgstr "اشیاء ردگیری نمایانگر ردگیری پشتهی یک :ref:`استثنا <tut-errors>` هستند. یک شیء ردگیری بهطور ضمنی هنگام رخدادن یک استثنا ایجاد میشود، و همچنین میتواند بهطور صریح با فراخوانی :class:`types.TracebackType` ایجاد شود."
msgid "Traceback objects can now be explicitly instantiated from Python code."
msgstr "اشیای ردگیری پشته اکنون میتوانند بهصورت صریح از کد پایتون نمونهسازی شوند."
msgid "For implicitly created tracebacks, when the search for an exception handler unwinds the execution stack, at each unwound level a traceback object is inserted in front of the current traceback. When an exception handler is entered, the stack trace is made available to the program. (See section :ref:`try`.) It is accessible as the third item of the tuple returned by :func:`sys.exc_info`, and as the :attr:`~BaseException.__traceback__` attribute of the caught exception."
msgstr "در مورد ردگیریهای پشتهای که بهطور ضمنی ایجاد میشوند، هنگامی که جستوجو برای یک هندلر استثنا موجب باز شدن پشتهی اجرا میشود، در هر سطح بازشده یک شیء ردگیری پشته پیش از ردگیری پشتهی فعلی درج میشود. هنگامی که برنامه وارد یک هندلر استثنا میشود، ردگیری پشته در دسترس برنامه قرار میگیرد. (به بخش :ref:`try <try>` مراجعه کنید.) این ردگیری پشته بهعنوان سومین آیتم از تاپلی که :func:`sys.exc_info` برمیگرداند، و بهعنوان ویژگی :attr:`~BaseException.__traceback__` استثنای گرفتهشده قابل دسترسی است."
msgid "When the program contains no suitable handler, the stack trace is written (nicely formatted) to the standard error stream; if the interpreter is interactive, it is also made available to the user as :data:`sys.last_traceback`."
msgstr "هنگامی که برنامه فاقد هندلری مناسبی باشد، ردگیری پشته (بهخوبی قالببندیشده) به جریان خطای استاندارد نوشته میشود؛ اگر مفسر تعاملی باشد، این ردگیری پشته نیز بهعنوان :data:`sys.last_traceback` در اختیار کاربر قرار میگیرد."
msgid "For explicitly created tracebacks, it is up to the creator of the traceback to determine how the :attr:`~traceback.tb_next` attributes should be linked to form a full stack trace."
msgstr "برای ردگیریهای پشتهای که بهصراحت ایجاد میشوند، تعیین نحوه اتصال ویژگیهای :attr:`~traceback.tb_next` برای تشکیل یک ردگیری پشته کامل، بر عهده ایجادکننده ردگیری پشته است."
msgid "Points to the execution :ref:`frame <frame-objects>` of the current level."
msgstr "به :ref:`فریم <frame-objects>` اجرای سطح فعلی اشاره میکند."
msgid "Accessing this attribute raises an :ref:`auditing event <auditing>` ``object.__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``."
msgstr "دسترسی به این ویژگی، یک :ref:`رویداد حسابرسی <auditing>` ``object.__getattr__`` را با آرگومانهای ``obj`` و ``\"tb_frame\"`` پرتاب میکند."
msgid "Gives the line number where the exception occurred"
msgstr "شمارهی سطری که استثنا در آن رخ داده است را میدهد"
msgid "Indicates the \"precise instruction\"."
msgstr "نشاندهندهی «دستور دقیق» است."
msgid "The line number and last instruction in the traceback may differ from the line number of its :ref:`frame object <frame-objects>` if the exception occurred in a :keyword:`try` statement with no matching except clause or with a :keyword:`finally` clause."
msgstr "شماره خط و آخرین دستور در ردگیری پشته ممکن است با شماره خطِ :ref:`شیء فریم <frame-objects>` آن متفاوت باشد، اگر استثنا در یک دستور :keyword:`try` بدون بند except منطبق یا با بند :keyword:`finally` رخ داده باشد."