Repository navigation
Expand file tree
/
Copy pathenum.po
More file actions
1286 lines (1029 loc) · 70.1 KB
/
Copy pathenum.po
File metadata and controls
1286 lines (1029 loc) · 70.1 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-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-14 12:02+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 ":mod:`!enum` --- Support for enumerations"
msgstr ":mod:`!enum` --- پشتیبانی از شمارشها"
msgid "**Source code:** :source:`Lib/enum.py`"
msgstr "**کد منبع:** :source:`Lib/enum.py`"
msgid "This page contains the API reference information. For tutorial information and discussion of more advanced topics, see"
msgstr "این صفحه شامل اطلاعات مرجع API است. برای اطلاعات آموزشی و بحث دربارهی موضوعات پیشرفتهتر، ببینید"
msgid ":ref:`Basic Tutorial <enum-basic-tutorial>`"
msgstr ":ref:`خودآموز مقدماتی <enum-basic-tutorial>`"
msgid ":ref:`Advanced Tutorial <enum-advanced-tutorial>`"
msgstr ":ref:`آموزش پیشرفته <enum-advanced-tutorial>`"
msgid ":ref:`Enum Cookbook <enum-cookbook>`"
msgstr ":ref:`کتاب آشپزی Enum <enum-cookbook>`"
msgid "An enumeration:"
msgstr "یک شمارش:"
msgid "is a set of symbolic names (members) bound to unique values"
msgstr "مجموعهای از نامهای نمادین (اعضا) است که به مقادیر یکتا مقید شدهاند"
msgid "can be iterated over to return its canonical (i.e. non-alias) members in definition order"
msgstr "میتوان آن را پیمایش کرد تا اعضای کانونیکال (یعنی غیرمستعار) آن به ترتیب تعریف برگردانده شوند"
msgid "uses *call* syntax to return members by value"
msgstr "از سینتکس *call* برای برگرداندن اعضا بر اساس مقدار استفاده میکند"
msgid "uses *index* syntax to return members by name"
msgstr "از سینتکس *اندیس* برای برگرداندن اعضا بر اساس نام استفاده میکند"
msgid "Enumerations are created either by using :keyword:`class` syntax, or by using function-call syntax::"
msgstr "شمارشها یا با استفاده از سینتکس :keyword:`class` یا با استفاده از سینتکس فراخوانی تابع ایجاد میشوند::"
msgid ""
">>> from enum import Enum\n"
"\n"
">>> # class syntax\n"
">>> class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 3\n"
"\n"
">>> # functional syntax\n"
">>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])"
msgstr ""
">>> from enum import Enum\n"
"\n"
">>> # class syntax\n"
">>> class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 3\n"
"\n"
">>> # functional syntax\n"
">>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])"
msgid "Even though we can use :keyword:`class` syntax to create Enums, Enums are not normal Python classes. See :ref:`How are Enums different? <enum-class-differences>` for more details."
msgstr "اگرچه شما میتوانید از سینتکس :keyword:`class` برای ایجاد Enumها استفاده کنید، Enumها کلاسهای معمولی پایتون نیستند. برای جزئیات بیشتر :ref:`Enumها چگونه متفاوت هستند؟ <enum-class-differences>` را ببینید."
msgid "Nomenclature"
msgstr "نامگذاری"
msgid "The class :class:`!Color` is an *enumeration* (or *enum*)"
msgstr "کلاس :class:`!Color` یک *شمارش* (یا *enum*) است"
msgid "The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are *enumeration members* (or *members*) and are functionally constants."
msgstr "ویژگیهای :attr:`!Color.RED`، :attr:`!Color.GREEN` و غیره، *اعضای شمارشی* (یا *اعضا*) هستند و از نظر عملکردی ثابت هستند."
msgid "The enum members have *names* and *values* (the name of :attr:`!Color.RED` is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)"
msgstr "اعضای enum دارای *نامها* و *مقدارها* هستند (نام :attr:`!Color.RED` برابر ``RED`` است، مقدار :attr:`!Color.BLUE` برابر ``3`` است، و غیره)"
msgid "Module contents"
msgstr "محتویات ماژول"
msgid ":class:`EnumType`"
msgstr ":class:`EnumType`"
msgid "The ``type`` for Enum and its subclasses."
msgstr "``type`` برای Enum و زیرکلاسهای آن."
msgid ":class:`Enum`"
msgstr ":class:`Enum`"
msgid "Base class for creating enumerated constants."
msgstr "کلاس پایه برای ایجاد ثوابت شمارشی."
msgid ":class:`IntEnum`"
msgstr ":class:`IntEnum`"
msgid "Base class for creating enumerated constants that are also subclasses of :class:`int`. (`Notes`_)"
msgstr "کلاس پایه برای ایجاد ثابتهای شمارشی که همچنین زیرکلاسهایی از :class:`int` هستند. (`Notes`_)"
msgid ":class:`StrEnum`"
msgstr ":class:`StrEnum`"
msgid "Base class for creating enumerated constants that are also subclasses of :class:`str`. (`Notes`_)"
msgstr "کلاس پایه برای ایجاد ثابتهای شمارشی که زیرکلاسهایی از :class:`str` نیز هستند. (`Notes`_)"
msgid ":class:`Flag`"
msgstr ":class:`Flag`"
msgid "Base class for creating enumerated constants that can be combined using the bitwise operations without losing their :class:`Flag` membership."
msgstr "کلاس پایه برای ایجاد ثابتهای شمارششده که میتوان آنها را با استفاده از عملیات بیتی ترکیب کرد، بدون آنکه عضویت آنها در :class:`Flag` از دست برود."
msgid ":class:`IntFlag`"
msgstr ":class:`IntFlag`"
msgid "Base class for creating enumerated constants that can be combined using the bitwise operators without losing their :class:`IntFlag` membership. :class:`IntFlag` members are also subclasses of :class:`int`. (`Notes`_)"
msgstr "کلاس پایه برای ایجاد ثابتهای شمارشی که میتوان آنها را با استفاده از عملگرهای بیتی ترکیب کرد، بدون از دست دادن عضویت آنها در :class:`IntFlag`. اعضای :class:`IntFlag` همچنین زیرکلاسهایی از :class:`int` هستند. (`Notes`_)"
msgid ":class:`ReprEnum`"
msgstr ":class:`ReprEnum`"
msgid "Used by :class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag` to keep the :class:`str() <str>` of the mixed-in type."
msgstr "توسط :class:`IntEnum`، :class:`StrEnum` و :class:`IntFlag` استفاده میشود تا :class:`str() <str>` نوع افزودهشده (mixed-in) حفظ شود."
msgid ":class:`EnumCheck`"
msgstr ":class:`EnumCheck`"
msgid "An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and ``UNIQUE``, for use with :func:`verify` to ensure various constraints are met by a given enumeration."
msgstr "یک شمارش با مقادیر ``CONTINUOUS``، ``NAMED_FLAGS`` و ``UNIQUE``، برای استفاده با :func:`verify` تا اطمینان حاصل شود که محدودیتهای مختلف توسط یک شمارش مشخص برآورده میشوند."
msgid ":class:`FlagBoundary`"
msgstr ":class:`FlagBoundary`"
msgid "An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP`` which allows for more fine-grained control over how invalid values are dealt with in an enumeration."
msgstr "یک شمارش با مقادیر ``STRICT``، ``CONFORM``، ``EJECT`` و ``KEEP`` که امکان کنترل دقیقتر بر چگونگی رسیدگی به مقادیر نامعتبر در یک شمارش را فراهم میکند."
msgid ":class:`EnumDict`"
msgstr ":class:`EnumDict`"
msgid "A subclass of :class:`dict` for use when subclassing :class:`EnumType`."
msgstr "زیرکلاسی از :class:`dict` برای استفاده هنگام زیرکلاسسازی از :class:`EnumType`."
msgid ":class:`auto`"
msgstr ":class:`auto`"
msgid "Instances are replaced with an appropriate value for Enum members. :class:`StrEnum` defaults to the lower-cased version of the member name, while other Enums default to 1 and increase from there."
msgstr "نمونهها با مقدار مناسبی برای اعضای Enum جایگزین میشوند. مقدار پیشفرض :class:`StrEnum` نسخه با حروف کوچک نام عضو است، در حالی که مقدار پیشفرض سایر Enumها ۱ است و از آن مقدار افزایش مییابد."
msgid ":deco:`~enum.property`"
msgstr ":deco:`~enum.property`"
msgid "Allows :class:`Enum` members to have attributes without conflicting with member names. The ``value`` and ``name`` attributes are implemented this way."
msgstr "به اعضای :class:`Enum` اجازه میدهد ویژگیهایی داشته باشند که با نام اعضا تداخل نمیکنند. ویژگیهای ``value`` و ``name`` به همین شکل پیادهسازی شدهاند."
msgid ":deco:`unique`"
msgstr ":deco:`unique`"
msgid "Enum class decorator that ensures only one name is bound to any one value."
msgstr "دکوراتور کلاس Enum که تضمین میکند به هر مقدار تنها یک نام مقید شده باشد."
msgid ":deco:`verify`"
msgstr ":deco:`verify`"
msgid "Enum class decorator that checks user-selectable constraints on an enumeration."
msgstr "دکوراتور کلاس Enum که محدودیتهای قابلانتخاب توسط کاربر روی یک شمارش را بررسی میکند."
msgid ":deco:`member`"
msgstr ":deco:`member`"
msgid "Make ``obj`` a member. Can be used as a decorator."
msgstr "``obj`` را به یک عضو تبدیل میکند. میتواند بهعنوان دکوراتور استفاده شود."
msgid ":deco:`nonmember`"
msgstr ":deco:`nonmember`"
msgid "Do not make ``obj`` a member. Can be used as a decorator."
msgstr "``obj`` را عضو نکنید. میتواند بهعنوان دکوراتور استفاده شود."
msgid ":deco:`global_enum`"
msgstr ":deco:`global_enum`"
msgid "Modify the :class:`str() <str>` and :func:`repr` of an enum to show its members as belonging to the module instead of its class, and export the enum members to the global namespace."
msgstr ":class:`str() <str>` و :func:`repr` یک شمارش (enum) را تغییر میدهد؛ اعضای آن بهجای کلاس شمارش، متعلق به ماژول نمایش داده میشوند و اعضای شمارش به فضای نام سراسری اکسپورت میشوند."
msgid ":func:`show_flag_values`"
msgstr ":func:`show_flag_values`"
msgid "Return a list of all power-of-two integers contained in a flag."
msgstr "فهرستی از تمام اعداد صحیح توان دو موجود در یک پرچم را برمیگرداند."
msgid ":func:`enum.bin`"
msgstr ":func:`enum.bin`"
msgid "Like built-in :func:`bin`, except negative values are represented in two's complement, and the leading bit always indicates sign (``0`` implies positive, ``1`` implies negative)."
msgstr "مانند :func:`bin` توکار، با این تفاوت که مقادیر منفی بهصورت مکمل دو نمایش داده میشوند و بیت پیشرو همیشه علامت را نشان میدهد (``0`` به معنای مثبت و ``1`` به معنای منفی است)."
msgid "``Flag``, ``IntFlag``, ``auto``"
msgstr "``Flag``, ``IntFlag``, ``auto``"
msgid "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, ``member``, ``nonmember``, ``global_enum``, ``show_flag_values``"
msgstr "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, ``member``, ``nonmember``, ``global_enum``, ``show_flag_values``"
msgid "``EnumDict``"
msgstr "``EnumDict``"
msgid "Data types"
msgstr "انواع داده"
msgid "*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible to subclass *EnumType* -- see :ref:`Subclassing EnumType <enumtype-examples>` for details."
msgstr "*EnumType* :term:`فراکلاس <metaclass>` برای شمارشهای *enum* است. امکان زیرکلاسسازی *EnumType* وجود دارد -- برای جزئیات، :ref:`زیرکلاسسازی EnumType <enumtype-examples>` را ببینید."
msgid "``EnumType`` is responsible for setting the correct :meth:`!__repr__`, :meth:`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the final *enum*, as well as creating the enum members, properly handling duplicates, providing iteration over the enum class, etc."
msgstr "``EnumType`` مسئول تنظیم متدهای صحیح :meth:`!__repr__`، :meth:`!__str__`، :meth:`!__format__` و :meth:`!__reduce__` بر روی *enum* نهایی، و همچنین ایجاد اعضای enum، مدیریت صحیح موارد تکراری، فراهم کردن پیمایش بر روی کلاس enum و غیره است."
msgid "Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available as an alias."
msgstr "پیش از 3.11، ``EnumType`` با نام ``EnumMeta`` شناخته میشد، که هنوز بهعنوان یک نام مستعار در دسترس است."
msgid "This method is called in two different ways:"
msgstr "این متد به دو روش مختلف فراخوانی میشود:"
msgid "to look up an existing member:"
msgstr "برای جستوجوی یک عضو موجود:"
msgid "cls"
msgstr "cls"
msgid "The enum class being called."
msgstr "کلاس enum که فراخوانی میشود."
msgid "value"
msgstr "مقدار"
msgid "The value to lookup."
msgstr "مقدار مورد جستجو."
msgid "to use the ``cls`` enum to create a new enum (only if the existing enum does not have any members):"
msgstr "برای استفاده از enum ``cls`` جهت ایجاد یک enum جدید (تنها در صورتی که enum موجود هیچ عضوی نداشته باشد):"
msgid "The name of the new Enum to create."
msgstr "نام Enum جدیدی که باید ایجاد شود."
msgid "names"
msgstr "نامها"
msgid "The names/values of the members for the new Enum."
msgstr "نامها/مقادیر اعضای Enum جدید."
msgid "module"
msgstr "ماژول"
msgid "The name of the module the new Enum is created in."
msgstr "نام ماژولی که Enum جدید در آن ایجاد میشود."
msgid "qualname"
msgstr "نام کامل (qualname)"
msgid "The actual location in the module where this Enum can be found."
msgstr "مکان واقعی در ماژول که این Enum در آن یافت میشود."
msgid "type"
msgstr "نوع"
msgid "A mix-in type for the new Enum."
msgstr "یک نوع میکساین برای Enum جدید."
msgid "start"
msgstr "شروع"
msgid "The first integer value for the Enum (used by :class:`auto`)."
msgstr "اولین مقدار عدد صحیح برای Enum (که توسط :class:`auto` استفاده میشود)."
msgid "boundary"
msgstr "مرز"
msgid "How to handle out-of-range values from bit operations (:class:`Flag` only)."
msgstr "چگونگی مدیریت مقادیر خارج از محدوده حاصل از عملیات بیتی (فقط :class:`Flag`)."
msgid "Returns ``True`` if member belongs to the ``cls``::"
msgstr "اگر عضو به ``cls`` تعلق داشته باشد، ``True`` را برمیگرداند::"
msgid ""
">>> some_var = Color.RED\n"
">>> some_var in Color\n"
"True\n"
">>> Color.RED.value in Color\n"
"True"
msgstr ""
">>> some_var = Color.RED\n"
">>> some_var in Color\n"
"True\n"
">>> Color.RED.value in Color\n"
"True"
msgid "Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used in a containment check."
msgstr "پیش از Python 3.12، اگر از مقداری که عضو Enum نیست در بررسی عضویت استفاده شود، یک ``TypeError`` پرتاب میشود."
msgid "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the names of the members in *cls*::"
msgstr "``['__class__', '__doc__', '__members__', '__module__']`` و نام اعضای *cls* را برمیگرداند::"
msgid ""
">>> dir(Color)\n"
"['BLUE', 'GREEN', 'RED', '__class__', '__contains__', '__doc__', '__getitem__', '__init_subclass__', '__iter__', '__len__', '__members__', '__module__', '__name__', '__qualname__']"
msgstr ""
">>> dir(Color)\n"
"['BLUE', 'GREEN', 'RED', '__class__', '__contains__', '__doc__', '__getitem__', '__init_subclass__', '__iter__', '__len__', '__members__', '__module__', '__name__', '__qualname__']"
msgid "Returns the Enum member in *cls* matching *name*, or raises a :exc:`KeyError`::"
msgstr "عضو Enum در *cls* را که با *name* مطابقت دارد برمیگرداند، یا یک :exc:`KeyError` را پرتاب میکند::"
msgid ""
">>> Color['BLUE']\n"
"<Color.BLUE: 3>"
msgstr ""
">>> Color['BLUE']\n"
"<Color.BLUE: 3>"
msgid "Returns each member in *cls* in definition order::"
msgstr "هر یک از اعضای *cls* را به ترتیب تعریف برمیگرداند::"
msgid ""
">>> list(Color)\n"
"[<Color.RED: 1>, <Color.GREEN: 2>, <Color.BLUE: 3>]"
msgstr ""
">>> list(Color)\n"
"[<Color.RED: 1>, <Color.GREEN: 2>, <Color.BLUE: 3>]"
msgid "Returns the number of members in *cls*::"
msgstr "تعداد اعضای *cls* را برمیگرداند::"
msgid ""
">>> len(Color)\n"
"3"
msgstr ""
">>> len(Color)\n"
"3"
msgid "Returns a mapping of every enum name to its member, including aliases"
msgstr "یک نگاشت از هر نام enum به عضو آن، از جمله نامهای مستعار، برمیگرداند"
msgid "Returns each member in *cls* in reverse definition order::"
msgstr "هر یک از اعضای *cls* را به ترتیب معکوس تعریف برمیگرداند::"
msgid ""
">>> list(reversed(Color))\n"
"[<Color.BLUE: 3>, <Color.GREEN: 2>, <Color.RED: 1>]"
msgstr ""
">>> list(reversed(Color))\n"
"[<Color.BLUE: 3>, <Color.GREEN: 2>, <Color.RED: 1>]"
msgid "*Enum* is the base class for all *enum* enumerations."
msgstr "*Enum* کلاس پایه برای تمام شمارشهای *enum* است."
msgid "The name used to define the ``Enum`` member::"
msgstr "نام استفادهشده برای تعریف عضو ``Enum``::"
msgid ""
">>> Color.BLUE.name\n"
"'BLUE'"
msgstr ""
">>> Color.BLUE.name\n"
"'BLUE'"
msgid "The value given to the ``Enum`` member::"
msgstr "مقدار دادهشده به عضو ``Enum``::"
msgid ""
">>> Color.RED.value\n"
"1"
msgstr ""
">>> Color.RED.value\n"
"1"
msgid "Value of the member, can be set in :meth:`~Enum.__new__`."
msgstr "مقدار عضو را میتوان در :meth:`~Enum.__new__` تنظیم کرد."
msgid "Enum member values"
msgstr "مقادیر اعضای Enum"
msgid "Member values can be anything: :class:`int`, :class:`str`, etc. If the exact value is unimportant you may use :class:`auto` instances and an appropriate value will be chosen for you. See :class:`auto` for the details."
msgstr "مقادیر اعضا میتوانند هر چیزی باشند: :class:`int`، :class:`str` و غیره. اگر مقدار دقیق مهم نیست، میتوانید از نمونههای :class:`auto` استفاده کنید و مقدار مناسبی برای شما انتخاب خواهد شد. برای جزئیات، :class:`auto` را ببینید."
msgid "While mutable/unhashable values, such as :class:`dict`, :class:`list` or a mutable :class:`~dataclasses.dataclass`, can be used, they will have a quadratic performance impact during creation relative to the total number of mutable/unhashable values in the enum."
msgstr "اگرچه میتوان از مقادیر تغییرپذیر/هشناپذیر (unhashable)، مانند :class:`dict`، :class:`list` یا یک :class:`~dataclasses.dataclass` تغییرپذیر استفاده کرد، اما این مقادیر در هنگام ایجاد، تأثیری درجهدو بر عملکرد نسبت به تعداد کل مقادیر تغییرپذیر/هشناپذیر در enum خواهند داشت."
msgid "Name of the member."
msgstr "نام عضو."
msgid "No longer used, kept for backward compatibility. (class attribute, removed during class creation)."
msgstr "دیگر استفاده نمیشود و برای سازگاری با نسخههای پیشین حفظ شده است. (صفت کلاس، در هنگام ایجاد کلاس حذف میشود)."
msgid "The :attr:`~Enum._order_` attribute can be provided to help keep Python 2 / Python 3 code in sync. It will be checked against the actual order of the enumeration and raise an error if the two do not match::"
msgstr "میتوان ویژگی :attr:`~Enum._order_` را برای کمک به همگام نگهداشتن کد Python 2 / Python 3 ارائه کرد. این ویژگی با ترتیب واقعی شمارش مقایسه میشود و اگر این دو با هم مطابقت نداشته باشند، خطایی پرتاب میشود::"
msgid ""
">>> class Color(Enum):\n"
"... _order_ = 'RED GREEN BLUE'\n"
"... RED = 1\n"
"... BLUE = 3\n"
"... GREEN = 2\n"
"...\n"
"Traceback (most recent call last):\n"
"...\n"
"TypeError: member order does not match _order_:\n"
" ['RED', 'BLUE', 'GREEN']\n"
" ['RED', 'GREEN', 'BLUE']"
msgstr ""
">>> class Color(Enum):\n"
"... _order_ = 'RED GREEN BLUE'\n"
"... RED = 1\n"
"... BLUE = 3\n"
"... GREEN = 2\n"
"...\n"
"Traceback (most recent call last):\n"
"...\n"
"TypeError: member order does not match _order_:\n"
" ['RED', 'BLUE', 'GREEN']\n"
" ['RED', 'GREEN', 'BLUE']"
msgid "In Python 2 code the :attr:`~Enum._order_` attribute is necessary as definition order is lost before it can be recorded."
msgstr "در کد Python 2، ویژگی :attr:`~Enum._order_` ضروری است، زیرا ترتیب تعریف پیش از آنکه بتوان آن را ثبت کرد، از دست میرود."
msgid "``_ignore_`` is only used during creation and is removed from the enumeration once creation is complete."
msgstr "``_ignore_`` تنها در حین ایجاد استفاده میشود و پس از تکمیل ایجاد، از شمارش حذف میشود."
msgid "``_ignore_`` is a list of names that will not become members, and whose names will also be removed from the completed enumeration. See :ref:`TimePeriod <enum-time-period>` for an example."
msgstr "``_ignore_`` فهرستی از نامها است که عضو نخواهند شد و نامهایشان نیز از شمارش کاملشده حذف خواهند شد. برای مشاهده یک مثال، :ref:`TimePeriod <enum-time-period>` را ببینید."
msgid "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any public methods defined on *self.__class__*::"
msgstr "بازمیگرداند ``['__class__', '__doc__', '__module__', 'name', 'value']`` و هر متد عمومی تعریفشده در *self.__class__*::"
msgid ""
">>> from enum import Enum\n"
">>> import datetime as dt\n"
">>> class Weekday(Enum):\n"
"... MONDAY = 1\n"
"... TUESDAY = 2\n"
"... WEDNESDAY = 3\n"
"... THURSDAY = 4\n"
"... FRIDAY = 5\n"
"... SATURDAY = 6\n"
"... SUNDAY = 7\n"
"... @classmethod\n"
"... def today(cls):\n"
"... print(f'today is {cls(dt.date.today().isoweekday()).name}')\n"
"...\n"
">>> dir(Weekday.SATURDAY)\n"
"['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', 'today', 'value']"
msgstr ""
">>> from enum import Enum\n"
">>> import datetime as dt\n"
">>> class Weekday(Enum):\n"
"... MONDAY = 1\n"
"... TUESDAY = 2\n"
"... WEDNESDAY = 3\n"
"... THURSDAY = 4\n"
"... FRIDAY = 5\n"
"... SATURDAY = 6\n"
"... SUNDAY = 7\n"
"... @classmethod\n"
"... def today(cls):\n"
"... print(f'today is {cls(dt.date.today().isoweekday()).name}')\n"
"...\n"
">>> dir(Weekday.SATURDAY)\n"
"['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', 'today', 'value']"
msgid "name"
msgstr "نام"
msgid "The name of the member being defined (e.g. 'RED')."
msgstr "نام عضوی که تعریف میشود (مثلاً 'RED')."
msgid "The start value for the Enum; the default is 1."
msgstr "مقدار شروع برای Enum؛ مقدار پیشفرض ۱ است."
msgid "count"
msgstr "تعداد"
msgid "The number of members currently defined, not including this one."
msgstr "تعداد اعضای تعریفشده در حال حاضر، بدون احتساب این عضو."
msgid "last_values"
msgstr "last_values"
msgid "A list of the previous values."
msgstr "فهرستی از مقادیر پیشین."
msgid "A *staticmethod* that is used to determine the next value returned by :class:`auto`."
msgstr "یک *staticmethod* که برای تعیین مقدار بعدی برگرداندهشده توسط :class:`auto` استفاده میشود."
msgid "For standard :class:`Enum` classes the next value chosen is the highest value seen incremented by one."
msgstr "برای کلاسهای استاندارد :class:`Enum`، مقدار بعدی انتخابشده برابر با بالاترین مقدار مشاهدهشده بهاضافهی یک است."
msgid "For :class:`Flag` classes the next value chosen will be the next highest power-of-two."
msgstr "برای کلاسهای :class:`Flag`، مقدار انتخابشدهی بعدی، بالاترین توان بعدی عدد ۲ خواهد بود."
msgid "This method may be overridden, e.g.::"
msgstr "میتوان این متد را بازنویسی کرد، برای مثال::"
msgid ""
">>> from enum import auto, Enum\n"
">>> class PowersOfThree(Enum):\n"
"... @staticmethod\n"
"... def _generate_next_value_(name, start, count, last_values):\n"
"... return 3 ** (count + 1)\n"
"... FIRST = auto()\n"
"... SECOND = auto()\n"
"...\n"
">>> PowersOfThree.SECOND.value\n"
"9"
msgstr ""
">>> from enum import auto, Enum\n"
">>> class PowersOfThree(Enum):\n"
"... @staticmethod\n"
"... def _generate_next_value_(name, start, count, last_values):\n"
"... return 3 ** (count + 1)\n"
"... FIRST = auto()\n"
"... SECOND = auto()\n"
"...\n"
">>> PowersOfThree.SECOND.value\n"
"9"
msgid "Prior versions would use the last seen value instead of the highest value."
msgstr "نسخههای پیشین بهجای بیشترین مقدار، از آخرین مقدار دیدهشده استفاده میکردند."
msgid "By default, does nothing. If multiple values are given in the member assignment, those values become separate arguments to ``__init__``; e.g."
msgstr "بهطور پیشفرض، هیچ کاری انجام نمیدهد. اگر چندین مقدار در انتساب عضو داده شوند، آن مقادیر به آرگومانهای جداگانهای برای ``__init__`` تبدیل میشوند؛ برای مثال."
msgid "``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, 'Mon')``"
msgstr "``Weekday.__init__()`` بهصورت ``Weekday.__init__(self, 1, 'Mon')`` فراخوانی میشود"
msgid "A *classmethod* that is used to further configure subsequent subclasses. By default, does nothing."
msgstr "یک *classmethod* که برای پیکربندی بیشتر زیرکلاسهای بعدی به کار میرود. بهطور پیشفرض، کاری انجام نمیدهد."
msgid "A *classmethod* for looking up values not found in *cls*. By default it does nothing, but can be overridden to implement custom search behavior::"
msgstr "یک *classmethod* برای جستوجوی مقادیری که در *cls* یافت نمیشوند. بهطور پیشفرض هیچ کاری انجام نمیدهد، اما میتوان آن را برای پیادهسازی رفتار جستوجوی سفارشی بازنویسی کرد::"
msgid ""
">>> from enum import auto, StrEnum\n"
">>> class Build(StrEnum):\n"
"... DEBUG = auto()\n"
"... OPTIMIZED = auto()\n"
"... @classmethod\n"
"... def _missing_(cls, value):\n"
"... value = value.lower()\n"
"... for member in cls:\n"
"... if member.value == value:\n"
"... return member\n"
"... return None\n"
"...\n"
">>> Build.DEBUG.value\n"
"'debug'\n"
">>> Build('deBUG')\n"
"<Build.DEBUG: 'debug'>"
msgstr ""
">>> from enum import auto, StrEnum\n"
">>> class Build(StrEnum):\n"
"... DEBUG = auto()\n"
"... OPTIMIZED = auto()\n"
"... @classmethod\n"
"... def _missing_(cls, value):\n"
"... value = value.lower()\n"
"... for member in cls:\n"
"... if member.value == value:\n"
"... return member\n"
"... return None\n"
"...\n"
">>> Build.DEBUG.value\n"
"'debug'\n"
">>> Build('deBUG')\n"
"<Build.DEBUG: 'debug'>"
msgid "By default, doesn't exist. If specified, either in the enum class definition or in a mixin class (such as ``int``), all values given in the member assignment will be passed; e.g."
msgstr "بهطور پیشفرض، وجود ندارد. اگر مشخص شده باشد، چه در تعریف کلاس enum و چه در یک کلاس mixin (مانند ``int``)، تمام مقادیر دادهشده در انتساب عضو ارسال خواهند شد؛ برای مثال."
msgid "results in the call ``int('1a', 16)`` and a value of ``26`` for the member."
msgstr "به فراخوانی ``int('1a', 16)`` و مقدار ``26`` برای عضو منجر میشود."
msgid "When writing a custom ``__new__``, do not use ``super().__new__`` -- call the appropriate ``__new__`` instead."
msgstr "هنگام نوشتن ``__new__`` سفارشی، از ``super().__new__`` استفاده نکنید -- در عوض، ``__new__`` مناسب را فراخوانی کنید."
msgid "Returns the string used for *repr()* calls. By default, returns the *Enum* name, member name, and value, but can be overridden::"
msgstr "رشتهای را برمیگرداند که برای فراخوانیهای *repr()* استفاده میشود. بهطور پیشفرض، نام *Enum*، نام عضو و مقدار را برمیگرداند، اما میتوان آن را بازنویسی کرد::"
msgid ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __repr__(self):\n"
"... cls_name = self.__class__.__name__\n"
"... return f'{cls_name}.{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(OtherStyle.ALTERNATE, 'OtherStyle.ALTERNATE', 'OtherStyle.ALTERNATE')"
msgstr ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __repr__(self):\n"
"... cls_name = self.__class__.__name__\n"
"... return f'{cls_name}.{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(OtherStyle.ALTERNATE, 'OtherStyle.ALTERNATE', 'OtherStyle.ALTERNATE')"
msgid "Returns the string used for *str()* calls. By default, returns the *Enum* name and member name, but can be overridden::"
msgstr "رشتهی استفادهشده برای فراخوانیهای *str()* را بازمیگرداند. بهطور پیشفرض، نام *Enum* و نام عضو را بازمیگرداند، اما میتوان آن را بازنویسی کرد::"
msgid ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __str__(self):\n"
"... return f'{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(<OtherStyle.ALTERNATE: 1>, 'ALTERNATE', 'ALTERNATE')"
msgstr ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __str__(self):\n"
"... return f'{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(<OtherStyle.ALTERNATE: 1>, 'ALTERNATE', 'ALTERNATE')"
msgid "Returns the string used for *format()* and *f-string* calls. By default, returns :meth:`__str__` return value, but can be overridden::"
msgstr "رشتهای را برمیگرداند که برای فراخوانیهای *format()* و *افاسترینگ* استفاده میشود. بهطور پیشفرض، مقدار بازگشتی :meth:`__str__` را برمیگرداند، اما میتوان آن را بازنویسی کرد::"
msgid ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __format__(self, spec):\n"
"... return f'{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(<OtherStyle.ALTERNATE: 1>, 'OtherStyle.ALTERNATE', 'ALTERNATE')"
msgstr ""
">>> from enum import auto, Enum\n"
">>> class OtherStyle(Enum):\n"
"... ALTERNATE = auto()\n"
"... OTHER = auto()\n"
"... SOMETHING_ELSE = auto()\n"
"... def __format__(self, spec):\n"
"... return f'{self.name}'\n"
"...\n"
">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle.ALTERNATE}\"\n"
"(<OtherStyle.ALTERNATE: 1>, 'OtherStyle.ALTERNATE', 'ALTERNATE')"
msgid "Using :class:`auto` with :class:`Enum` results in integers of increasing value, starting with ``1``."
msgstr "استفاده از :class:`auto` همراه با :class:`Enum` منجر به اعداد صحیحی با مقادیر افزایشی میشود که از ``1`` شروع میشوند."
msgid "Added :ref:`enum-dataclass-support`"
msgstr ":ref:`enum-dataclass-support` افزوده شد"
msgid "Adds a new name as an alias to an existing member::"
msgstr "یک نام جدید را بهعنوان نام مستعار به یک عضو موجود اضافه میکند::"
msgid ""
">>> Color.RED._add_alias_(\"ERROR\")\n"
">>> Color.ERROR\n"
"<Color.RED: 1>"
msgstr ""
">>> Color.RED._add_alias_(\"ERROR\")\n"
">>> Color.ERROR\n"
"<Color.RED: 1>"
msgid "Raises a :exc:`NameError` if the name is already assigned to a different member."
msgstr "اگر نام از پیش به عضو دیگری اختصاص داده شده باشد، یک :exc:`NameError` پرتاب میکند."
msgid "Adds a new value as an alias to an existing member::"
msgstr "یک مقدار جدید را بهعنوان نام مستعار برای یک عضو موجود اضافه میکند::"
msgid ""
">>> Color.RED._add_value_alias_(42)\n"
">>> Color(42)\n"
"<Color.RED: 1>"
msgstr ""
">>> Color.RED._add_value_alias_(42)\n"
">>> Color(42)\n"
"<Color.RED: 1>"
msgid "Raises a :exc:`ValueError` if the value is already linked with a different member."
msgstr "اگر مقدار از قبل به عضو دیگری پیوند داده شده باشد، یک :exc:`ValueError` پرتاب میکند."
msgid "See :ref:`multi-value-enum` for an example."
msgstr "برای دیدن یک مثال به :ref:`multi-value-enum` مراجعه کنید."
msgid "*IntEnum* is the same as :class:`Enum`, but its members are also integers and can be used anywhere that an integer can be used. If any integer operation is performed with an *IntEnum* member, the resulting value loses its enumeration status."
msgstr "*IntEnum* همانند :class:`Enum` است، اما اعضای آن همچنین عدد صحیح هستند و میتوانند در هر جایی که یک عدد صحیح میتواند استفاده شود، به کار روند. اگر هرگونه عملیات مربوط به عدد صحیح با یک عضو *IntEnum* انجام شود، مقدار حاصل وضعیت شمارشی خود را از دست میدهد."
msgid "Using :class:`auto` with :class:`IntEnum` results in integers of increasing value, starting with ``1``."
msgstr "استفاده از :class:`auto` با :class:`IntEnum` باعث ایجاد اعداد صحیحی با مقادیر افزایشی میشود که از ``1`` شروع میشوند."
msgid ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the *replacement of existing constants* use-case. :meth:`~object.__format__` was already :meth:`!int.__format__` for that same reason."
msgstr ":meth:`~object.__str__` اکنون :meth:`!int.__str__` است تا بهتر از کاربرد *جایگزینی ثابتهای موجود* پشتیبانی کند. :meth:`~object.__format__` از پیش به همین دلیل :meth:`!int.__format__` بود."
msgid "*StrEnum* is the same as :class:`Enum`, but its members are also strings and can be used in most of the same places that a string can be used. The result of any string operation performed on or with a *StrEnum* member is not part of the enumeration."
msgstr "*StrEnum* همانند :class:`Enum` است، اما اعضای آن نیز رشته هستند و میتوان از آنها در بیشتر همان جاهایی استفاده کرد که از یک رشته استفاده میشود. نتیجهی هر عملیات رشتهای که بر روی یک عضو *StrEnum* یا با آن انجام شود، بخشی از شمارش نیست."
msgid "There are places in the stdlib that check for an exact :class:`str` instead of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of ``isinstance(unknown, str)``), and in those locations you will need to use ``str(MyStrEnum.MY_MEMBER)``."
msgstr "در کتابخانه استاندارد جاهایی وجود دارند که دقیقاً :class:`str` را بهجای زیرکلاسی از :class:`str` بررسی میکنند (یعنی ``type(unknown) == str`` بهجای ``isinstance(unknown, str)``)، و در آن مکانها باید از ``str(MyStrEnum.MY_MEMBER)`` استفاده کنید."
msgid "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member name as the value."
msgstr "استفاده از :class:`auto` با :class:`StrEnum` منجر به استفاده از نام عضو با حروف کوچک بهعنوان مقدار میشود."
msgid ":meth:`~object.__str__` is :meth:`!str.__str__` to better support the *replacement of existing constants* use-case. :meth:`~object.__format__` is likewise :meth:`!str.__format__` for that same reason."
msgstr ":meth:`~object.__str__` همان :meth:`!str.__str__` است تا بهتر از مورد استفادهی *جایگزینی ثابتهای موجود* پشتیبانی کند. :meth:`~object.__format__` نیز به همین دلیل همان :meth:`!str.__format__` است."
msgid "``Flag`` is the same as :class:`Enum`, but its members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operations are (aliases of) members of the enumeration."
msgstr "``Flag`` همان :class:`Enum` است، اما اعضای آن از عملگرهای بیتی ``&`` (*AND*)، ``|`` (*OR*)، ``^`` (*XOR*) و ``~`` (*INVERT*) پشتیبانی میکنند؛ نتایج این عملیات، اعضای این شمارش هستند (نامهای مستعار اعضای آن)."
msgid "Returns *True* if value is in self::"
msgstr "اگر مقدار در self وجود داشته باشد، *True* را برمیگرداند::"
msgid ""
">>> from enum import Flag, auto\n"
">>> class Color(Flag):\n"
"... RED = auto()\n"
"... GREEN = auto()\n"
"... BLUE = auto()\n"
"...\n"
">>> purple = Color.RED | Color.BLUE\n"
">>> white = Color.RED | Color.GREEN | Color.BLUE\n"
">>> Color.GREEN in purple\n"
"False\n"
">>> Color.GREEN in white\n"
"True\n"
">>> purple in white\n"
"True\n"
">>> white in purple\n"
"False"
msgstr ""
">>> from enum import Flag, auto\n"
">>> class Color(Flag):\n"
"... RED = auto()\n"
"... GREEN = auto()\n"
"... BLUE = auto()\n"
"...\n"
">>> purple = Color.RED | Color.BLUE\n"
">>> white = Color.RED | Color.GREEN | Color.BLUE\n"
">>> Color.GREEN in purple\n"
"False\n"
">>> Color.GREEN in white\n"
"True\n"
">>> purple in white\n"
"True\n"
">>> white in purple\n"
"False"
msgid "Returns all contained non-alias members::"
msgstr "تمام اعضای غیرمستعار موجود را بازمیگرداند::"
msgid ""
">>> list(Color.RED)\n"
"[<Color.RED: 1>]\n"
">>> list(purple)\n"
"[<Color.RED: 1>, <Color.BLUE: 4>]"
msgstr ""
">>> list(Color.RED)\n"
"[<Color.RED: 1>]\n"
">>> list(purple)\n"
"[<Color.RED: 1>, <Color.BLUE: 4>]"
msgid "Returns number of members in flag::"
msgstr "تعداد اعضای پرچم را برمیگرداند::"
msgid ""
">>> len(Color.GREEN)\n"
"1\n"
">>> len(white)\n"
"3"
msgstr ""
">>> len(Color.GREEN)\n"
"1\n"
">>> len(white)\n"
"3"
msgid "Returns *True* if any members in flag, *False* otherwise::"
msgstr "اگر پرچم دارای حداقل یک عضو باشد، *True* و در غیر این صورت *False* برمیگرداند::"
msgid ""
">>> bool(Color.GREEN)\n"
"True\n"
">>> bool(white)\n"
"True\n"
">>> black = Color(0)\n"
">>> bool(black)\n"
"False"
msgstr ""
">>> bool(Color.GREEN)\n"
"True\n"
">>> bool(white)\n"
"True\n"
">>> black = Color(0)\n"
">>> bool(black)\n"
"False"
msgid "Returns current flag binary or'ed with other::"
msgstr "مقدار دودویی پرچم جاری را که با other بهصورت OR دودویی ترکیب شده است، برمیگرداند::"
msgid ""
">>> Color.RED | Color.GREEN\n"
"<Color.RED|GREEN: 3>"
msgstr ""
">>> Color.RED | Color.GREEN\n"
"<Color.RED|GREEN: 3>"
msgid "Returns current flag binary and'ed with other::"
msgstr "پرچم فعلی را که با other AND دودوییشده است برمیگرداند::"
msgid ""
">>> purple & white\n"
"<Color.RED|BLUE: 5>\n"
">>> purple & Color.GREEN\n"
"<Color: 0>"
msgstr ""
">>> purple & white\n"
"<Color.RED|BLUE: 5>\n"
">>> purple & Color.GREEN\n"
"<Color: 0>"
msgid "Returns current flag binary xor'ed with other::"
msgstr "پرچم فعلی را که با other XOR دودوییشده است، برمیگرداند::"
msgid ""
">>> purple ^ white\n"
"<Color.GREEN: 2>\n"
">>> purple ^ Color.GREEN\n"
"<Color.RED|GREEN|BLUE: 7>"
msgstr ""
">>> purple ^ white\n"
"<Color.GREEN: 2>\n"
">>> purple ^ Color.GREEN\n"
"<Color.RED|GREEN|BLUE: 7>"
msgid "Returns all the flags in *type(self)* that are not in *self*::"
msgstr "تمام پرچمهای موجود در *type(self)* را که در *self* نیستند، برمیگرداند::"
msgid ""
">>> ~white\n"
"<Color: 0>\n"
">>> ~purple\n"
"<Color.GREEN: 2>\n"
">>> ~Color.RED\n"
"<Color.GREEN|BLUE: 6>"
msgstr ""
">>> ~white\n"
"<Color: 0>\n"
">>> ~purple\n"
"<Color.GREEN: 2>\n"
">>> ~Color.RED\n"
"<Color.GREEN|BLUE: 6>"
msgid "Function used to format any remaining unnamed numeric values. Default is the value's repr; common choices are :func:`hex` and :func:`oct`."
msgstr "تابعی که برای قالببندی هر مقدار عددی بینام باقیمانده استفاده میشود. پیشفرض، repr مقدار است؛ انتخابهای رایج :func:`hex` و :func:`oct` هستند."
msgid "Using :class:`auto` with :class:`Flag` results in integers that are powers of two, starting with ``1``."
msgstr "استفاده از :class:`auto` با :class:`Flag` منجر به اعداد صحیحی میشود که توانهای دو هستند و با ``1`` شروع میشوند."
msgid "The *repr()* of zero-valued flags has changed. It is now:"
msgstr "خروجی *repr()* پرچمهای با مقدار صفر تغییر کرده است. اکنون به این صورت است:"
msgid "``IntFlag`` is the same as :class:`Flag`, but its members are also integers and can be used anywhere that an integer can be used."
msgstr "``IntFlag`` همان :class:`Flag` است، اما اعضای آن همچنین اعداد صحیح هستند و میتوانند در هر جایی که بتوان از یک عدد صحیح استفاده کرد، به کار بروند."
msgid "If any integer operation is performed with an *IntFlag* member, the result is not an *IntFlag*::"
msgstr "اگر هرگونه عملیات عدد صحیح با یک عضو *IntFlag* انجام شود، نتیجه یک *IntFlag* نخواهد بود::"
msgid ""
">>> Color.RED + 2\n"
"3"
msgstr ""
">>> Color.RED + 2\n"
"3"
msgid "If a :class:`Flag` operation is performed with an *IntFlag* member and:"
msgstr "اگر یک عملیات :class:`Flag` با یک عضو *IntFlag* انجام شود و:"
msgid "the result is a valid *IntFlag*: an *IntFlag* is returned"
msgstr "نتیجه یک *IntFlag* معتبر است: یک *IntFlag* بازگردانده میشود"
msgid "the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting"
msgstr "نتیجه یک *IntFlag* معتبر نیست: نتیجه به تنظیم :class:`FlagBoundary` بستگی دارد"
msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now::"
msgstr "خروجی :func:`repr` پرچمهای بینام با مقدار صفر تغییر کرده است. اکنون به این صورت است::"
msgid ""
">>> Color(0)\n"
"<Color: 0>"
msgstr ""
">>> Color(0)\n"
"<Color: 0>"
msgid "Using :class:`auto` with :class:`IntFlag` results in integers that are powers of two, starting with ``1``."
msgstr "استفاده از :class:`auto` همراه با :class:`IntFlag`، به اعداد صحیحی منجر میشود که توانهای دو هستند و از ``1`` شروع میشوند."
msgid ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the *replacement of existing constants* use-case. :meth:`~object.__format__` was already :meth:`!int.__format__` for that same reason."
msgstr ":meth:`~object.__str__` اکنون :meth:`!int.__str__` است تا بهتر از سناریوی استفادهی *جایگزینی ثابتهای موجود* پشتیبانی کند. :meth:`~object.__format__` از پیش به همین دلیل :meth:`!int.__format__` بود."
msgid "Inversion of an :class:`!IntFlag` now returns a positive value that is the union of all flags not in the given flag, rather than a negative value. This matches the existing :class:`Flag` behavior."
msgstr "وارونهسازی یک :class:`!IntFlag` اکنون بهجای یک مقدار منفی، مقدار مثبتی را برمیگرداند که اجتماع تمام پرچمهایی است که در پرچم دادهشده وجود ندارند. این با رفتار موجود :class:`Flag` مطابقت دارد."
msgid ":class:`!ReprEnum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, but the :class:`str() <str>` of the mixed-in data type:"
msgstr ":class:`!ReprEnum` از :meth:`repr() <Enum.__repr__>` :class:`Enum` استفاده میکند، اما از :class:`str() <str>`\\ نوع دادهی افزودهشده (mixed-in) استفاده میکند:"
msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`"
msgstr ":meth:`!int.__str__` برای :class:`IntEnum` و :class:`IntFlag`"
msgid ":meth:`!str.__str__` for :class:`StrEnum`"
msgstr ":meth:`!str.__str__` برای :class:`StrEnum`"
msgid "Inherit from :class:`!ReprEnum` to keep the :class:`str() <str>` / :func:`format` of the mixed-in data type instead of using the :class:`Enum`-default :meth:`str() <Enum.__str__>`."
msgstr "برای حفظ :class:`str() <str>` / :func:`format` نوع دادهی افزودهشده (mixed-in) بهجای استفاده از :meth:`str() <Enum.__str__>` پیشفرض :class:`Enum`، از :class:`!ReprEnum` ارث ببرید."
msgid "*EnumCheck* contains the options used by the :func:`verify` decorator to ensure various constraints; failed constraints result in a :exc:`ValueError`."
msgstr "*EnumCheck* شامل گزینههایی است که دکوراتور :func:`verify` برای اطمینان از برقراری محدودیتهای مختلف از آنها استفاده میکند؛ محدودیتهای ناموفق به یک :exc:`ValueError` منجر میشوند."
msgid "Ensure that each value has only one name::"
msgstr "اطمینان حاصل کنید که هر مقدار تنها یک نام دارد::"
msgid ""
">>> from enum import Enum, verify, UNIQUE\n"
">>> @verify(UNIQUE)\n"
"... class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 3\n"
"... CRIMSON = 1\n"
"Traceback (most recent call last):\n"
"...\n"
"ValueError: aliases found in <enum 'Color'>: CRIMSON -> RED"
msgstr ""
">>> from enum import Enum, verify, UNIQUE\n"
">>> @verify(UNIQUE)\n"
"... class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 3\n"
"... CRIMSON = 1\n"
"Traceback (most recent call last):\n"
"...\n"
"ValueError: aliases found in <enum 'Color'>: CRIMSON -> RED"
msgid "Ensure that there are no missing values between the lowest-valued member and the highest-valued member::"
msgstr "اطمینان حاصل کنید که هیچ مقدار جاافتادهای بین عضو با کمترین مقدار و عضو با بیشترین مقدار وجود ندارد::"
msgid ""
">>> from enum import Enum, verify, CONTINUOUS\n"
">>> @verify(CONTINUOUS)\n"
"... class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 5\n"
"Traceback (most recent call last):\n"
"...\n"
"ValueError: invalid enum 'Color': missing values 3, 4"
msgstr ""
">>> from enum import Enum, verify, CONTINUOUS\n"
">>> @verify(CONTINUOUS)\n"
"... class Color(Enum):\n"
"... RED = 1\n"
"... GREEN = 2\n"
"... BLUE = 5\n"
"Traceback (most recent call last):\n"
"...\n"
"ValueError: invalid enum 'Color': missing values 3, 4"