Repository navigation
Expand file tree
/
Copy pathdifflib.po
More file actions
842 lines (692 loc) · 71.9 KB
/
Copy pathdifflib.po
File metadata and controls
842 lines (692 loc) · 71.9 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
# 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
# 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-21 11:59+0000\n"
"PO-Revision-Date: 2026-09-14 16:12+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:`!difflib` --- Helpers for computing deltas"
msgstr ":mod:`!difflib` --- کمککنندههایی برای محاسبهی دلتاها"
msgid "**Source code:** :source:`Lib/difflib.py`"
msgstr "**کد منبع:** :source:`Lib/difflib.py`"
msgid "This module provides classes and functions for comparing sequences. Most of them compare sequences of text lines (for example lists of strings, or :term:`file objects <file object>`) and produce :dfn:`diffs` -- reports on the differences. Diffs can be produced in various formats, including HTML and context and unified diffs -- formats produced by tools like :manpage:`diff <diff(1)>` and :manpage:`git diff <git-diff(1)>`."
msgstr "این ماژول کلاسها و توابعی برای مقایسهی دنبالهها فراهم میکند. اکثر آنها دنبالههای سطرهای متن را مقایسه میکنند (مثلاً فهرستهای رشتهها، یا :term:`شیءهای پرونده <file object>`) و :dfn:`تفاوتها (diffs)` تولید میکنند -- گزارشهایی دربارهی تفاوتها. تفاوتها میتوانند در قالبهای مختلفی تولید شوند، شامل HTML و تفاوتهای زمینهای و یکپارچه -- قالبهایی که توسط ابزارهایی مانند :manpage:`diff <diff(1)>` و :manpage:`git diff <git-diff(1)>` تولید میشوند."
msgid "Comparisons are done using a matching algorithm implemented in :class:`SequenceMatcher` -- a flexible class for comparing pairs of sequences of any type, not just text, so long as the sequence elements are :term:`hashable`."
msgstr "مقایسهها با استفاده از الگوریتم تطبیقی انجام میشوند که در :class:`SequenceMatcher` پیادهسازی شده است — کلاسی انعطافپذیر برای مقایسهی جفتهایی از دنبالههای هر نوعی، نه فقط متن، مشروط بر اینکه عناصر دنباله :term:`hashable` باشند."
msgid "Junk heuristic"
msgstr "هیوریستیک زباله (Junk heuristic)"
msgid ":mod:`!difflib` uses a :dfn:`junk` heuristic: some items are deemed to be :dfn:`junk`, and ignored when searching for similarities. Ideally, these are uninteresting or common items, such as blank lines or whitespace."
msgstr ":mod:`!difflib` از یک اکتشافی :dfn:`junk` استفاده میکند: برخی آیتمها بهعنوان :dfn:`junk` تلقی میشوند و هنگام جستوجوی شباهتها نادیده گرفته میشوند. در حالت ایدهآل، اینها آیتمهای بیاهمیت یا رایج هستند، مانند سطرهای خالی یا فضای سفید."
msgid "This heuristic can speed the algorithm up (because it reduces the number of possible combinations) and it can produce results that are more understandable for humans (typically breaking on whitespace). But it can also cause pathological cases:"
msgstr "این روش اکتشافی میتواند سرعت الگوریتم را افزایش دهد (زیرا تعداد ترکیبهای ممکن را کاهش میدهد) و میتواند نتایجی تولید کند که برای انسان قابلفهمتر هستند (معمولاً شکستن در فضای خالی). اما همچنین میتواند باعث ایجاد موارد آسیبشناختی شود:"
msgid "Inappropriately chosen junk items can cause an unexpectedly **large** (but still correct) result."
msgstr "آیتمهای هرزی که بهصورت نامناسب انتخاب شدهاند، میتوانند منجر به نتیجهای بهطور غیرمنتظرهای **بزرگ** (اما همچنان صحیح) شوند."
msgid "The default heuristic is **asymmetric**: only the second sequence is inspected when determining what is considered junk, so comparing A to B can give different results than comparing B to A and reversing the result."
msgstr "روش اکتشافی پیشفرض **نامتقارن** است: هنگام تعیین اینکه چه چیزی آشغال محسوب میشود، فقط دنبالهی دوم بررسی میشود؛ بنابراین مقایسهی A با B میتواند نتایج متفاوتی نسبت به مقایسهی B با A و معکوس کردن نتیجه بدهد."
msgid "By default, if the second input sequence is at least 200 items long, items that account for more than 1% it are considered *junk*."
msgstr "بهطور پیشفرض، اگر طول دومین دنباله ورودی حداقل ۲۰۰ آیتم باشد، آیتمهایی که بیش از ۱٪ آن را تشکیل میدهند، *آشغال* در نظر گرفته میشوند."
msgid "Depending on your data, you should consider turning this heuristic off (setting :class:`~difflib.SequenceMatcher`'s *autojunk* argument to ``False``) or tuning it (using the *isjunk* argument, perhaps to one of the :ref:`predefined functions <difflib-isjunk-functions>`)."
msgstr "بسته به دادههای شما، شما باید در نظر بگیرید که این هیوریستیک را غیرفعال کنید (تنظیم آرگومان *autojunk* کلاس :class:`~difflib.SequenceMatcher` به ``False``) یا آن را تنظیم کنید (با استفاده از آرگومان *isjunk*، احتمالاً به یکی از :ref:`توابع از پیش تعریف شده <difflib-isjunk-functions>`)."
msgid "The :mod:`!difflib` algorithm"
msgstr "الگوریتم :mod:`!difflib`"
msgid "The algorithm used in :class:`SequenceMatcher` predates, and is a little fancier than, an algorithm published in the late 1980s by Ratcliff and Obershelp under the hyperbolic name \"gestalt pattern matching.\" The idea is to find the longest contiguous subsequence common to both inputs, then recursively handle the pieces of the sequences to the left and to the right of the matching subsequence."
msgstr "الگوریتم استفادهشده در :class:`SequenceMatcher` از الگوریتمی که در اواخر دههی ۱۹۸۰ توسط رتکلیف و اوبرزهلپ با نام اغراقآمیز «تطبیق الگوی گشتالت (gestalt pattern matching)» منتشر شد، قدیمیتر است و کمی پیشرفتهتر از آن است. ایده این است که طولانیترین زیردنبالهی پیوستهی مشترک بین هر دو ورودی پیدا شود، سپس بخشهای دنبالهها در سمت چپ و راست زیردنبالهی منطبق بهصورت بازگشتی پردازش شوند."
msgid "`Pattern Matching: The Gestalt Approach <https://jacobfilipp.com/DrDobbs/articles/DDJ/1988/8807/8807c/8807c.htm>`_"
msgstr "`تطبیق الگو: رویکرد گشتالت <https://jacobfilipp.com/DrDobbs/articles/DDJ/1988/8807/8807c/8807c.htm>`_"
msgid "Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. This was published in Dr. Dobb's Journal in July, 1988."
msgstr "بحثی دربارهی یک الگوریتم مشابه توسط John W. Ratcliff و D. E. Metzener. این مطلب در ژوئیهی ۱۹۸۸ در مجلهی Dr. Dobb's Journal منتشر شد."
msgid "As an extension to the Ratcliff and Obershelp algorithm, :mod:`!difflib` searches for the longest *junk-free* contiguous subsequence. See the :ref:`difflib-junk` section for details."
msgstr "بهعنوان گسترشی بر الگوریتم Ratcliff و Obershelp، :mod:`!difflib` به دنبال طولانیترین زیردنبالهی پیوستهی *عاری از هرز* میگردد. برای جزئیات، بخش :ref:`difflib-junk` را ببینید."
msgid "Timing"
msgstr "زمانسنجی"
msgid "The basic Ratcliff-Obershelp algorithm is cubic time in the worst case and quadratic time in the expected case. :mod:`difflib`'s algorithm is quadratic time for the worst case and has expected-case behavior dependent in a complicated way on how many elements the sequences have in common; best case time is linear."
msgstr "الگوریتم پایهی Ratcliff-Obershelp در بدترین حالت دارای زمان مکعبی و در حالت مورد انتظار دارای زمان مربعی است. الگوریتم :mod:`difflib` در بدترین حالت دارای زمان مربعی است و رفتار آن در حالت مورد انتظار بهشکل پیچیدهای به تعداد عناصر مشترک دنبالهها وابسته است؛ زمان بهترین حالت خطی است."
msgid "Diff generation"
msgstr "تولید تفاوت (diff)"
msgid "This is a class for comparing sequences of lines of text, and producing human-readable differences or deltas. Differ uses :class:`SequenceMatcher` both to compare sequences of lines, and to compare sequences of characters within similar (near-matching) lines."
msgstr "این یک کلاس برای مقایسهی دنبالههایی از سطرهای متن و تولید تفاوتها یا دلتاهای قابلخواندن برای انسان است. Differ از :class:`SequenceMatcher` هم برای مقایسهی دنبالههایی از سطرهای و هم برای مقایسهی دنبالههایی از نویسهها درون سطرهای مشابه (تقریباً منطبق) استفاده میکند."
msgid "Each line of a :class:`Differ` delta begins with a two-letter code:"
msgstr "هر خط از دلتای :class:`Differ` با کدی دو نویسهای آغاز میشود:"
msgid "Code"
msgstr "کد"
msgid "Meaning"
msgstr "معنی"
msgid "``'- '``"
msgstr "``'- '``"
msgid "line unique to sequence 1"
msgstr "خط مختص دنبالهی ۱"
msgid "``'+ '``"
msgstr "``'+ '``"
msgid "line unique to sequence 2"
msgstr "خط یکتا برای دنباله ۲"
msgid "``' '``"
msgstr "``' '``"
msgid "line common to both sequences"
msgstr "خط مشترک بین هر دو دنباله"
msgid "``'? '``"
msgstr "``'? '``"
msgid "line not present in either input sequence"
msgstr "خط در هیچیک از دنبالههای ورودی وجود ندارد"
msgid "Lines beginning with '``?``' attempt to guide the eye to intraline differences, and were not present in either input sequence. These lines can be confusing if the sequences contain whitespace characters, such as spaces, tabs or line breaks."
msgstr "سطرهایی که با '``?``' شروع میشوند، تلاش میکنند توجه را به تفاوتهای درونخطی جلب کنند، و در هیچیک از دنبالههای ورودی وجود نداشتند. این سطرهای ممکن است در صورتی گیجکننده باشند که دنبالهها حاوی نویسههای فضای خالی مانند فاصلهها، تبها یا سطرهای جدید باشند."
msgid "Note that :class:`Differ`\\ -generated deltas make no claim to be **minimal** diffs. To the contrary, minimal diffs are often counter-intuitive for humans, because they synch up anywhere possible, sometimes at accidental matches 100 pages apart. Restricting synch points to contiguous matches preserves some notion of locality, at the occasional cost of producing a longer diff."
msgstr "توجه داشته باشید که دلتاهای تولیدشده توسط :class:`Differ` ادعایی ندارند که تفاوتهای **کمینه** باشند. برعکس، تفاوتهای کمینه اغلب برای انسانها برخلاف شهود هستند، زیرا در هر جایی که ممکن باشد همگام میشوند، گاهی در تطابقهای تصادفی که ۱۰۰ صفحه با یکدیگر فاصله دارند. محدود کردن نقاط همگامسازی به تطابقهای متوالی، تا حدی مفهوم محلی بودن را حفظ میکند، هرچند گاهی به بهای تولید یک تفاوت طولانیتر تمام میشود."
msgid "The :class:`Differ` class has this constructor:"
msgstr "کلاس :class:`Differ` این سازنده را دارد:"
msgid "Optional keyword parameters *linejunk* and *charjunk* are for filter functions (or ``None``):"
msgstr "پارامترهای کلیدواژهای اختیاری *linejunk* و *charjunk* برای توابع فیلتر (یا ``None``) هستند:"
msgid "*linejunk*: A function that accepts a single string argument, and returns true if the string is junk. The default is ``None``, meaning that no line is considered junk."
msgstr "*linejunk*: تابعی که تنها یک آرگومان رشتهای میپذیرد و اگر رشته هرز باشد، مقدار true را برمیگرداند. مقدار پیشفرض ``None`` است، به این معنا که هیچ خطی هرز در نظر گرفته نمیشود."
msgid "*charjunk*: A function that accepts a single character argument (a string of length 1), and returns true if the character is junk. The default is ``None``, meaning that no character is considered junk."
msgstr "*charjunk*: تابعی که یک آرگومان تکنویسهای (رشتهای به طول ۱) میپذیرد و اگر نویسه هرز باشد، مقدار درست برمیگرداند. مقدار پیشفرض ``None`` است، یعنی هیچ نویسهای هرز در نظر گرفته نمیشود."
msgid "These junk-filtering functions speed up matching to find differences and do not cause any differing lines or characters to be ignored. Read the description of the :meth:`~SequenceMatcher.find_longest_match` method's *isjunk* parameter for an explanation."
msgstr "این توابع پالایش زباله (junk-filtering) سرعت تطبیق برای یافتن تفاوتها را افزایش میدهند و باعث نمیشوند هیچ خط یا نویسهی متفاوتی نادیده گرفته شود. برای توضیح، شرح پارامتر *isjunk* متد :meth:`~SequenceMatcher.find_longest_match` را بخوانید."
msgid ":class:`Differ` objects are used (deltas generated) via a single method:"
msgstr "از اشیای :class:`Differ` از طریق یک متد واحد استفاده میشود (دلتاها تولید میشوند):"
msgid "Compare two sequences of lines, and generate the delta (a sequence of lines)."
msgstr "دو دنباله از سطرها را مقایسه میکند و دلتا (دنبالهای از سطرهای) را تولید میکند."
msgid "Each sequence must contain individual single-line strings ending with newlines. Such sequences can be obtained from the :meth:`~io.IOBase.readlines` method of file-like objects. The generated delta also consists of newline-terminated strings, ready to be printed as-is via the :meth:`~io.IOBase.writelines` method of a file-like object."
msgstr "هر دنباله باید شامل رشتههای تکسطری جداگانهای باشد که به خط جدید ختم میشوند. چنین دنبالههایی را میتوان از متد :meth:`~io.IOBase.readlines` اشیاء شبهپرونده بهدست آورد. دلتای تولیدشده نیز از رشتههای ختمشده به خط جدید تشکیل شده است، که آمادهاند بههمینصورت از طریق متد :meth:`~io.IOBase.writelines` یک شیء شبهپرونده چاپ شوند."
msgid "This class can be used to create an HTML table (or a complete HTML file containing the table) showing a side by side, line by line comparison of text with inter-line and intra-line change highlights. The table can be generated in either full or contextual difference mode."
msgstr "از این کلاس میتوان برای ایجاد یک جدول HTML (یا یک پرونده HTML کامل شامل جدول) استفاده کرد که مقایسهی کنار هم و خطبهخط متن را با برجستهسازی تغییرات بینخطی و درونخطی نشان میدهد. این جدول را میتوان در حالت تفاوت کامل یا زمینهای تولید کرد."
msgid "The trailing newlines get stripped before the diff, so the result can be incomplete. See :gh:`71896` for details."
msgstr "سطرهای جدید پایانی پیش از diff حذف میشوند، بنابراین نتیجه ممکن است ناقص باشد. برای جزئیات :gh:`71896` را ببینید."
msgid "The constructor for this class is:"
msgstr "سازندهی این کلاس عبارت است از:"
msgid "Initializes instance of :class:`HtmlDiff`."
msgstr "نمونهای از :class:`HtmlDiff` را مقداردهی اولیه میکند."
msgid "*tabsize* is an optional keyword argument to specify tab stop spacing and defaults to ``8``."
msgstr "*tabsize* یک آرگومان کلیدواژهای اختیاری برای تعیین فاصلهگذاری تب است و مقدار پیشفرض آن ``8`` است."
msgid "*wrapcolumn* is an optional keyword to specify column number where lines are broken and wrapped, defaults to ``None`` where lines are not wrapped."
msgstr "*wrapcolumn* یک کلیدواژه اختیاری برای مشخص کردن شماره ستونی است که سطرهای در آن شکسته و به خط بعد منتقل میشوند، و بهطور پیشفرض ``None`` است که در این حالت سطرها به خط بعد منتقل نمیشوند."
msgid "*linejunk* and *charjunk* are optional keyword arguments passed into :func:`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML differences). See :func:`ndiff` documentation for argument default values and descriptions."
msgstr "*linejunk* و *charjunk* آرگومانهای کلیدواژهای اختیاری هستند که به :func:`ndiff` ارسال میشوند (توسط :class:`HtmlDiff` برای تولید تفاوتهای HTML بهصورت کنار هم استفاده میشود). برای مقادیر پیشفرض و توضیحات آرگومانها، مستندات :func:`ndiff` را ببینید."
msgid "The following methods are public:"
msgstr "متدهای زیر عمومی هستند:"
msgid "Compares *fromlines* and *tolines* (lists of strings) and returns a string which is a complete HTML file containing a table showing line by line differences with inter-line and intra-line changes highlighted."
msgstr "*fromlines* و *tolines* (فهرستهایی از رشتهها) را مقایسه میکند و رشتهای را برمیگرداند که یک پرونده HTML کامل حاوی جدولی است که تفاوتها را بهصورت خطبهخط نشان میدهد و تغییرات بینخطی و درونخطی در آن برجسته شدهاند."
msgid "*fromdesc* and *todesc* are optional keyword arguments to specify from/to file column header strings (both default to an empty string)."
msgstr "*fromdesc* و *todesc* آرگومانهای کلیدواژهای اختیاری هستند که برای مشخص کردن رشتههای سرآیند ستون پرونده مبدأ/مقصد استفاده میشوند (مقدار پیشفرض هر دو یک رشته خالی است)."
msgid "*context* and *numlines* are both optional keyword arguments. Set *context* to ``True`` when contextual differences are to be shown, else the default is ``False`` to show the full files. *numlines* defaults to ``5``. When *context* is ``True`` *numlines* controls the number of context lines which surround the difference highlights. When *context* is ``False`` *numlines* controls the number of lines which are shown before a difference highlight when using the \"next\" hyperlinks (setting to zero would cause the \"next\" hyperlinks to place the next difference highlight at the top of the browser without any leading context)."
msgstr "*context* و *numlines* هر دو آرگومان کلیدواژهای اختیاری هستند. هنگامی که باید تفاوتهای همراه با زمینه نمایش داده شوند، *context* را روی ``True`` تنظیم کنید، در غیر این صورت مقدار پیشفرض ``False`` است تا پروندههای کامل نمایش داده شوند. مقدار پیشفرض *numlines* برابر ``5`` است. وقتی *context* برابر ``True`` است، *numlines* تعداد سطرهای زمینهای را که تفاوتهای برجستهشده را در بر میگیرند، کنترل میکند. وقتی *context* برابر ``False`` است، *numlines* تعداد سطرهایی را که هنگام استفاده از ابرپیوندهای «next» پیش از یک تفاوت برجستهشده نمایش داده میشوند، کنترل میکند (تنظیم آن روی صفر باعث میشود ابرپیوندهای «next» تفاوت برجستهشده بعدی را بدون هیچ زمینه پیشین در بالای مرورگر قرار دهند)."
msgid "*fromdesc* and *todesc* are interpreted as unescaped HTML and should be properly escaped while receiving input from untrusted sources."
msgstr "*fromdesc* و *todesc* بهعنوان HTML خنثینشده تفسیر میشوند و باید هنگام دریافت ورودی از منابع نامطمئن، بهدرستی خنثی شوند."
msgid "*charset* keyword-only argument was added. The default charset of HTML document changed from ``'ISO-8859-1'`` to ``'utf-8'``."
msgstr "آرگومان فقط کلیدواژهای *charset* اضافه شد. مجموعهنویسه پیشفرض سند HTML از ``'ISO-8859-1'`` به ``'utf-8'`` تغییر کرد."
msgid "Compares *fromlines* and *tolines* (lists of strings) and returns a string which is a complete HTML table showing line by line differences with inter-line and intra-line changes highlighted."
msgstr "*fromlines* و *tolines* (فهرستهایی از رشتهها) را مقایسه میکند و رشتهای را برمیگرداند که یک جدول HTML کامل است و تفاوتهای خطبهخط را با تغییرات بینخطی و درونخطی برجستهشده نشان میدهد."
msgid "The arguments for this method are the same as those for the :meth:`make_file` method."
msgstr "آرگومانهای این متد همان آرگومانهای متد :meth:`make_file` هستند."
msgid "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in context diff format."
msgstr "*a* و *b* (فهرستهایی از رشتهها) را مقایسه میکند؛ دلتایی (یک :term:`تولیدگر <generator>` که سطرهای دلتا را تولید میکند) را در قالب context diff برمیگرداند."
msgid "Context diffs are a compact way of showing just the lines that have changed plus a few lines of context. The changes are shown in a before/after style. The number of context lines is set by *n* which defaults to three."
msgstr "دیفهای زمینهای (context diffs) روشی فشرده برای نمایش تنها سطرهایی هستند که تغییر کردهاند، بهعلاوه چند خط زمینه. تغییرها به سبک پیش/پس نمایش داده میشوند. تعداد سطرهای زمینه توسط *n* تنظیم میشود که مقدار پیشفرض آن ۳ است."
msgid "By default, the diff control lines (those with ``***`` or ``---``) are created with a trailing newline. This is helpful so that inputs created from :func:`io.IOBase.readlines` result in diffs that are suitable for use with :func:`io.IOBase.writelines` since both the inputs and outputs have trailing newlines."
msgstr "بهطور پیشفرض، سطرهای کنترلی تفاوت (diff) (آنهایی که ``***`` یا ``---`` دارند) با یک نویسهی خط جدید در انتها ایجاد میشوند. این موضوع مفید است تا ورودیهای ایجادشده از :func:`io.IOBase.readlines` به تفاوتهایی منجر شوند که برای استفاده با :func:`io.IOBase.writelines` مناسب باشند، زیرا هم ورودیها و هم خروجیها دارای نویسهی خط جدید در انتها هستند."
msgid "For inputs that do not have trailing newlines, set the *lineterm* argument to ``\"\"`` so that the output will be uniformly newline free."
msgstr "برای ورودیهایی که خط جدید پایانی ندارند، آرگومان *lineterm* را روی ``\"\"`` تنظیم کنید تا خروجی بهطور یکنواخت فاقد خط جدید باشد."
msgid "The context diff format normally has a header for filenames and modification times. Any or all of these may be specified using strings for *fromfile*, *tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally expressed in the ISO 8601 format. If not specified, the strings default to blanks."
msgstr "قالب diff زمینهای (context diff) معمولاً دارای سرآیندی برای نام پروندهها و زمانهای تغییر است. هر یک یا همهی این موارد را میتوان با استفاده از رشتههایی برای *fromfile*، *tofile*، *fromfiledate* و *tofiledate* مشخص کرد. زمانهای تغییر معمولاً در قالب ISO 8601 بیان میشوند. اگر مشخص نشوند، رشتهها بهطور پیشفرض خالی خواهند بود."
msgid "See :ref:`difflib-interface` for a more detailed example."
msgstr "برای مثالی با جزئیات بیشتر، :ref:`difflib-interface` را ببینید."
msgid "Return a list of the best \"good enough\" matches. *word* is a sequence for which close matches are desired (typically a string), and *possibilities* is a list of sequences against which to match *word* (typically a list of strings)."
msgstr "فهرستی از بهترین تطابقهای «بهاندازهی کافی خوب» را برمیگرداند. *word* دنبالهای است که تطابقهای نزدیک برای آن مطلوب است (معمولاً یک رشته)، و *possibilities* فهرستی از دنبالههاست که *word* با آنها تطبیق داده میشود (معمولاً فهرستی از رشتهها)."
msgid "Optional argument *n* (default ``3``) is the maximum number of close matches to return; *n* must be greater than ``0``."
msgstr "آرگومان اختیاری *n* (پیشفرض ``3``) حداکثر تعداد تطابقهای نزدیکی است که بازگردانده میشود؛ *n* باید بزرگتر از ``0`` باشد."
msgid "Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. Possibilities that don't score at least that similar to *word* are ignored."
msgstr "آرگومان اختیاری *cutoff* (پیشفرض ``0.6``) یک عدد اعشاری در بازه [۰، ۱] است. گزینههایی که امتیاز شباهت آنها به *word* حداقل این میزان نباشد، نادیده گرفته میشوند."
msgid "The best (no more than *n*) matches among the possibilities are returned in a list, sorted by similarity score, most similar first."
msgstr "بهترین تطابقها (حداکثر *n* مورد) از میان گزینههای ممکن در یک فهرست بازگردانده میشوند و بر اساس امتیاز شباهت مرتب شدهاند، به طوری که مشابهترین مورد در ابتدا قرار دارد."
msgid "Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style delta (a :term:`generator` generating the delta lines)."
msgstr "*a* و *b* (فهرستهایی از رشتهها) را مقایسه میکند؛ یک دلتا به سبک :class:`Differ` را برمیگرداند (یک :term:`تولیدگر <generator>` که سطرهای دلتا را تولید میکند)."
msgid "Optional keyword parameters *linejunk* and *charjunk* are filtering functions (or ``None``):"
msgstr "پارامترهای کلیدواژهای اختیاری *linejunk* و *charjunk* توابع پالایشگر (یا ``None``) هستند:"
msgid "*linejunk*: A function that accepts a single string argument, and returns true if the string is junk, or false if not. The default is ``None``. There is also a module-level function :func:`IS_LINE_JUNK`, which filters out lines without visible characters, except for at most one hash character (``'#'``) -- however the underlying :class:`SequenceMatcher` class does a dynamic analysis of which lines are so frequent as to constitute noise, and this usually works better than using this function."
msgstr "*linejunk*: تابعی که تنها یک آرگومان رشتهای را میپذیرد، و اگر رشته هرز باشد مقدار درست، و در غیر این صورت مقدار نادرست را برمیگرداند. مقدار پیشفرض ``None`` است. همچنین یک تابع در سطح ماژول :func:`IS_LINE_JUNK` وجود دارد که سطرهایی را که نویسههای قابل مشاهده ندارند، بهجز حداکثر یک نویسه هش (``'#'``)، فیلتر میکند -- با این حال، کلاس زیربنایی :class:`SequenceMatcher` تحلیلی پویا انجام میدهد تا مشخص کند کدام سطرهای آنقدر پرتکرار هستند که نویز محسوب میشوند، و این معمولاً بهتر از استفاده از این تابع عمل میکند."
msgid "*charjunk*: A function that accepts a character (a string of length 1), and returns if the character is junk, or false if not. The default is module-level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace characters (a blank or tab; it's a bad idea to include newline in this!)."
msgstr "*charjunk*: تابعی که یک نویسه (رشتهای به طول ۱) میپذیرد، و اگر نویسه هرز (junk) باشد، مقداری برمیگرداند، و در غیر این صورت false برمیگرداند. مقدار پیشفرض، تابع :func:`IS_CHARACTER_JUNK` در سطح ماژول است که نویسههای فضای سفید (فاصله یا تب؛ کار بدی است که خط جدید را در آن بگنجانید!) را فیلتر میکند."
msgid "Return one of the two sequences that generated a delta."
msgstr "یکی از دو دنبالهای را که دلتایی (delta) تولید کردهاند، برمیگرداند."
msgid "Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, extract lines originating from file 1 or 2 (parameter *which*), stripping off line prefixes."
msgstr "با داشتن یک *دنباله* تولیدشده توسط :meth:`Differ.compare` یا :func:`ndiff`، سطرهایی را که از پرونده ۱ یا ۲ آمدهاند (پارامتر *which*) استخراج کنید و پیشوندهای سطرها را حذف کنید."
msgid "Example:"
msgstr "مثال:"
msgid "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in unified diff format."
msgstr "*a* و *b* (فهرستهایی از رشتهها) را مقایسه میکند؛ یک دلتا (یک :term:`تولیدگر <generator>` که سطرهای دلتا را تولید میکند) را در قالب unified diff بازمیگرداند."
msgid "Unified diffs are a compact way of showing just the lines that have changed plus a few lines of context. The changes are shown in an inline style (instead of separate before/after blocks). The number of context lines is set by *n* which defaults to three."
msgstr "تفاوتهای یکپارچه (unified diffs) روشی فشرده برای نمایش تنها سطرهایی که تغییر کردهاند بههمراه چند خط زمینه هستند. تغییرات بهصورت درونخطی نمایش داده میشوند (بهجای بلوکهای جداگانهی قبل/بعد). تعداد سطرهای زمینه با *n* تنظیم میشود که مقدار پیشفرض آن ۳ است."
msgid "By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) are created with a trailing newline. This is helpful so that inputs created from :func:`io.IOBase.readlines` result in diffs that are suitable for use with :func:`io.IOBase.writelines` since both the inputs and outputs have trailing newlines."
msgstr "بهطور پیشفرض، سطرهای کنترلی diff (آنهایی که دارای ``---``، ``+++`` یا ``@@`` هستند) با یک خط جدید در پایان ایجاد میشوند. این موضوع مفید است تا ورودیهایی که از :func:`io.IOBase.readlines` ایجاد شدهاند، منجر به diffهایی شوند که برای استفاده با :func:`io.IOBase.writelines` مناسب هستند، زیرا هم ورودیها و هم خروجیها دارای خط جدید در پایان هستند."
msgid "The unified diff format normally has a header for filenames and modification times. Any or all of these may be specified using strings for *fromfile*, *tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally expressed in the ISO 8601 format. If not specified, the strings default to blanks."
msgstr "قالب unified diff معمولاً دارای سرآیندی برای نام پروندهها و زمانهای تغییر است. هرکدام یا همهی این موارد را میتوان با استفاده از رشتههایی برای *fromfile*، *tofile*، *fromfiledate* و *tofiledate* مشخص کرد. زمانهای تغییر معمولاً در قالب ISO 8601 بیان میشوند. اگر مشخص نشوند، رشتهها بهطور پیشفرض خالی خواهند بود."
msgid "Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must be a callable, typically either :func:`unified_diff` or :func:`context_diff`."
msgstr "*a* و *b* (فهرستهایی از اشیای bytes) را با استفاده از *dfunc* مقایسه میکند؛ دنبالهای از سطرهای دلتا (که آنها نیز bytes هستند) را در قالبی که *dfunc* برمیگرداند تولید میکند. *dfunc* باید یک شیء فراخوانیپذیر باشد، معمولاً یا :func:`unified_diff` یا :func:`context_diff`."
msgid "Allows you to compare data with unknown or inconsistent encoding. All inputs except *n* must be bytes objects, not str. Works by losslessly converting all inputs (except *n*) to str, and calling ``dfunc(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)``. The output of *dfunc* is then converted back to bytes, so the delta lines that you receive have the same unknown/inconsistent encodings as *a* and *b*."
msgstr "به شما امکان میدهد دادههایی با کدگذاری ناشناخته یا ناهماهنگ را مقایسه کنید. همهی ورودیها بهجز *n* باید اشیای bytes باشند، نه str. با تبدیل بدون اتلاف همهی ورودیها (بهجز *n*) به str و فراخوانی ``dfunc(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)`` کار میکند. سپس خروجی *dfunc* دوباره به bytes تبدیل میشود، بنابراین سطرهای دلتایی که دریافت میکنید، همان کدگذاریهای ناشناخته/ناهماهنگ *a* و *b* را دارند."
msgid "Junk definition functions"
msgstr "توابع تعریف زباله"
msgid "Return ``True`` for ignorable lines. The line *line* is ignorable if *line* is blank or contains a single ``'#'``, otherwise it is not ignorable. Used as a default for parameter *linejunk* in :func:`ndiff` in older versions."
msgstr "برای سطرهای قابلچشمپوشی ``True`` برمیگرداند. خط *line* قابلچشمپوشی است اگر *line* خالی باشد یا شامل یک ``'#'`` باشد، در غیر این صورت قابلچشمپوشی نیست. در نسخههای قدیمیتر بهعنوان پیشفرض پارامتر *linejunk* در :func:`ndiff` استفاده میشد."
msgid "Return ``True`` for ignorable characters. The character *ch* is ignorable if *ch* is a space or tab, otherwise it is not ignorable. Used as a default for parameter *charjunk* in :func:`ndiff`."
msgstr "``True`` را برای نویسههای قابل چشمپوشی برمیگرداند. نویسه *ch* در صورتی قابل چشمپوشی است که *ch* فاصله یا تب باشد، در غیر این صورت قابل چشمپوشی نیست. بهعنوان پیشفرض برای پارامتر *charjunk* در :func:`ndiff` استفاده میشود."
msgid "SequenceMatcher objects"
msgstr "اشیای SequenceMatcher"
msgid "Optional argument *isjunk* must be ``None`` (the default) or a one-argument function that takes a sequence element and returns true if and only if the element is \"junk\" and should be ignored. Passing ``None`` for *isjunk* is equivalent to passing ``lambda x: False``; in other words, no elements are ignored. For example, pass::"
msgstr "آرگومان اختیاری *isjunk* باید ``None`` (پیشفرض) یا تابعی با یک آرگومان باشد که عنصری از یک دنباله را میگیرد و اگر و تنها اگر آن عنصر «زائد» باشد و باید نادیده گرفته شود، مقدار درست برمیگرداند. پاس دادن ``None`` برای *isjunk* معادل پاس دادن ``lambda x: False`` است؛ به عبارت دیگر، هیچ عنصری نادیده گرفته نمیشود. برای مثال، این را پاس دهید::"
msgid "lambda x: x in \" \\t\""
msgstr "lambda x: x in \" \\t\""
msgid "if you're comparing lines as sequences of characters, and don't want to synch up on blanks or hard tabs."
msgstr "اگر سطرها را بهعنوان دنبالههایی از نویسهها مقایسه میکنید و نمیخواهید بر اساس فاصلهها یا تبهای سخت همگامسازی کنید."
msgid "The optional arguments *a* and *b* are sequences to be compared; both default to empty strings. The elements of both sequences must be :term:`hashable`."
msgstr "آرگومانهای اختیاری *a* و *b* دنبالههایی هستند که با هم مقایسه میشوند؛ مقدار پیشفرض هر دو، رشتههای خالی است. عناصر هر دو دنباله باید :term:`hashable` باشند."
msgid "The optional argument *autojunk* can be used to disable the automatic junk heuristic."
msgstr "میتوانید از آرگومان اختیاری *autojunk* برای غیرفعال کردن هیوریستیک خودکار هرز استفاده کنید."
msgid "Added the *autojunk* parameter."
msgstr "پارامتر *autojunk* اضافه شد."
msgid "SequenceMatcher objects get three data attributes: *bjunk* is the set of elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-junk elements considered popular by the heuristic (if it is not disabled); *b2j* is a dict mapping the remaining elements of *b* to a list of positions where they occur. All three are reset whenever *b* is reset with :meth:`set_seqs` or :meth:`set_seq2`."
msgstr "اشیای SequenceMatcher سه ویژگی داده دارند: *bjunk* مجموعهای از عناصر *b* است که *isjunk* برای آنها ``True`` است؛ *bpopular* مجموعهای از عناصر غیرزائد است که توسط اکتشافی، محبوب در نظر گرفته میشوند (اگر غیرفعال نشده باشد)؛ *b2j* دیکشنری است که عناصر باقیماندهی *b* را به فهرستی از موقعیتهایی که در آنها ظاهر میشوند نگاشت میکند. هر سه هر زمان که *b* با :meth:`set_seqs` یا :meth:`set_seq2` بازنشانی شود، بازنشانی میشوند."
msgid "The *bjunk* and *bpopular* attributes."
msgstr "ویژگیهای *bjunk* و *bpopular*."
msgid ":class:`SequenceMatcher` objects have the following methods:"
msgstr "اشیای :class:`SequenceMatcher` متدهای زیر را دارند:"
msgid "Set the two sequences to be compared."
msgstr "دو دنباله را برای مقایسه تنظیم میکند."
msgid ":class:`SequenceMatcher` computes and caches detailed information about the second sequence, so if you want to compare one sequence against many sequences, use :meth:`set_seq2` to set the commonly used sequence once and call :meth:`set_seq1` repeatedly, once for each of the other sequences."
msgstr ":class:`SequenceMatcher` جزئیات مربوط به دنباله دوم را محاسبه و در نهانگاه ذخیره میکند، بنابراین اگر میخواهید یک دنباله را با چندین دنباله مقایسه کنید، از :meth:`set_seq2` استفاده کنید تا دنبالهی پرکاربرد را یک بار تنظیم کنید و :meth:`set_seq1` را بهطور مکرر، یک بار برای هر یک از دنبالههای دیگر، فراخوانی کنید."
msgid "Set the first sequence to be compared. The second sequence to be compared is not changed."
msgstr "نخستین دنبالهی مورد مقایسه را تنظیم کنید. دومین دنبالهی مورد مقایسه تغییر نمیکند."
msgid "Set the second sequence to be compared. The first sequence to be compared is not changed."
msgstr "دومین دنبالهی مورد مقایسه را تنظیم کنید. اولین دنبالهی مورد مقایسه تغییر نمیکند."
msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``."
msgstr "طولانیترین بلوک منطبق را در ``a[alo:ahi]`` و ``b[blo:bhi]`` بیابید."
msgid "If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns ``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo <= i <= i+k <= ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j', k')`` meeting those conditions, the additional conditions ``k >= k'``, ``i <= i'``, and if ``i == i'``, ``j <= j'`` are also met. In other words, of all maximal matching blocks, return one that starts earliest in *a*, and of all those maximal matching blocks that start earliest in *a*, return the one that starts earliest in *b*."
msgstr "اگر *isjunk* حذف شده باشد یا ``None`` باشد، :meth:`find_longest_match` ``(i, j, k)`` را برمیگرداند بهطوری که ``a[i:i+k]`` برابر با ``b[j:j+k]`` است، که در آن ``alo <= i <= i+k <= ahi`` و ``blo <= j <= j+k <= bhi``. برای همهی ``(i', j', k')`` که این شرایط را دارند، شرایط اضافی ``k >= k'``، ``i <= i'`` و اگر ``i == i'``، ``j <= j'`` نیز برقرار هستند. به عبارت دیگر، از میان همهی بلوکهای منطبق بیشینه، یکی را برمیگرداند که زودترین شروع را در *a* دارد، و از میان همهی آن بلوکهای منطبق بیشینه که زودترین شروع را در *a* دارند، آن را برمیگرداند که زودترین شروع را در *b* دارد."
msgid "If *isjunk* was provided, first the longest matching block is determined as above, but with the additional restriction that no junk element appears in the block. Then that block is extended as far as possible by matching (only) junk elements on both sides. So the resulting block never matches on junk except as identical junk happens to be adjacent to an interesting match."
msgstr "اگر *isjunk* ارائه شده باشد، ابتدا طولانیترین بلوک منطبق همانگونه که در بالا توضیح داده شد تعیین میشود، اما با این محدودیت اضافی که هیچ عنصر هرز (junk) در بلوک وجود نداشته باشد. سپس آن بلوک تا حد ممکن با تطبیق (فقط) عناصر هرز در هر دو طرف گسترش مییابد. بنابراین بلوک حاصل هرگز بر عناصر هرز منطبق نمیشود، مگر آنکه عناصر هرز یکسان بهطور تصادفی مجاور یک تطبیق معنادار باشند."
msgid "Here's the same example as before, but considering blanks to be junk. That prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the second sequence directly. Instead only the ``'abcd'`` can match, and matches the leftmost ``'abcd'`` in the second sequence:"
msgstr "این همان مثال پیشین است، اما فاصلهها را هرز (junk) در نظر میگیریم. این امر مانع از آن میشود که ``' abcd'`` مستقیماً با ``' abcd'`` در انتهای دنباله دوم تطابق داشته باشد. در عوض، تنها ``'abcd'`` میتواند تطابق داشته باشد و با چپترین ``'abcd'`` در دنباله دوم مطابقت دارد:"
msgid "If no blocks match, this returns ``(alo, blo, 0)``."
msgstr "اگر هیچ بلوکی مطابقت نداشته باشد، ``(alo, blo, 0)`` برگردانده میشود."
msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``."
msgstr "این متد یک :term:`named tuple` با قالب ``Match(a, b, size)`` برمیگرداند."
msgid "Added default arguments."
msgstr "آرگومانهای پیشفرض اضافه شد."
msgid "Return list of triples describing non-overlapping matching subsequences. Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:j+n]``. The triples are monotonically increasing in *i* and *j*."
msgstr "فهرستی از سهتاییها را برمیگرداند که زیردنبالههای منطبق غیرهمپوشان را توصیف میکنند. هر سهتایی به شکل ``(i, j, n)`` است و به این معناست که ``a[i:i+n] == b[j:j+n]``. سهتاییها از نظر *i* و *j* بهطور یکنواخت صعودی هستند."
msgid "The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` are adjacent triples in the list, and the second is not the last triple in the list, then ``i+n < i'`` or ``j+n < j'``; in other words, adjacent triples always describe non-adjacent equal blocks."
msgstr "آخرین سهتایی ساختگی است و مقدار ``(len(a), len(b), 0)`` را دارد. این تنها سهتایی با ``n == 0`` است. اگر ``(i, j, n)`` و ``(i', j', n')`` سهتاییهای مجاور در فهرست باشند و دومی آخرین سهتایی در فهرست نباشد، آنگاه ``i+n < i'`` یا ``j+n < j'`` برقرار است؛ به عبارت دیگر، سهتاییهای مجاور همیشه بلوکهای برابرِ غیرمجاور را توصیف میکنند."
msgid ""
">>> s = SequenceMatcher(None, \"abxcd\", \"abcd\")\n"
">>> s.get_matching_blocks()\n"
"[Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)]"
msgstr ""
">>> s = SequenceMatcher(None, \"abxcd\", \"abcd\")\n"
">>> s.get_matching_blocks()\n"
"[Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)]"
msgid "Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == 0``, and remaining tuples have *i1* equal to the *i2* from the preceding tuple, and, likewise, *j1* equal to the previous *j2*."
msgstr "فهرستی از ۵-تاییها برمیگرداند که چگونگی تبدیل *a* به *b* را توصیف میکنند. هر ۵-تایی به شکل ``(tag, i1, i2, j1, j2)`` است. در اولین ۵-تایی، ``i1 == j1 == 0`` است، و در ۵-تاییهای باقیمانده، *i1* برابر با *i2* از ۵-تایی پیشین است، و به همین ترتیب، *j1* برابر با *j2* پیشین است."
msgid "The *tag* values are strings, with these meanings:"
msgstr "مقادیر *tag* رشتههایی با این معانی هستند:"
msgid "Value"
msgstr "مقدار"
msgid "``'replace'``"
msgstr "``'replace'``"
msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``."
msgstr "``a[i1:i2]`` باید با ``b[j1:j2]`` جایگزین شود."
msgid "``'delete'``"
msgstr "``'delete'``"
msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case."
msgstr "``a[i1:i2]`` باید حذف شود. توجه داشته باشید که در این حالت ``j1 == j2``."
msgid "``'insert'``"
msgstr "``'insert'``"
msgid "``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in this case."
msgstr "``b[j1:j2]`` باید در ``a[i1:i1]`` درج شود. توجه داشته باشید که در این حالت ``i1 == i2`` است."
msgid "``'equal'``"
msgstr "``'equal'``"
msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)."
msgstr "``a[i1:i2] == b[j1:j2]`` (زیردنبالهها برابر هستند)."
msgid "For example::"
msgstr "برای مثال::"
msgid ""
">>> a = \"qabxcd\"\n"
">>> b = \"abycdf\"\n"
">>> s = SequenceMatcher(None, a, b)\n"
">>> for tag, i1, i2, j1, j2 in s.get_opcodes():\n"
"... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(\n"
"... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))\n"
"delete a[0:1] --> b[0:0] 'q' --> ''\n"
"equal a[1:3] --> b[0:2] 'ab' --> 'ab'\n"
"replace a[3:4] --> b[2:3] 'x' --> 'y'\n"
"equal a[4:6] --> b[3:5] 'cd' --> 'cd'\n"
"insert a[6:6] --> b[5:6] '' --> 'f'"
msgstr ""
">>> a = \"qabxcd\"\n"
">>> b = \"abycdf\"\n"
">>> s = SequenceMatcher(None, a, b)\n"
">>> for tag, i1, i2, j1, j2 in s.get_opcodes():\n"
"... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(\n"
"... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))\n"
"delete a[0:1] --> b[0:0] 'q' --> ''\n"
"equal a[1:3] --> b[0:2] 'ab' --> 'ab'\n"
"replace a[3:4] --> b[2:3] 'x' --> 'y'\n"
"equal a[4:6] --> b[3:5] 'cd' --> 'cd'\n"
"insert a[6:6] --> b[5:6] '' --> 'f'"
msgid "Return a :term:`generator` of groups with up to *n* lines of context."
msgstr "یک :term:`تولیدگر <generator>` از گروههایی با حداکثر *n* خط از زمینه برمیگرداند."
msgid "Starting with the groups returned by :meth:`get_opcodes`, this method splits out smaller change clusters and eliminates intervening ranges which have no changes."
msgstr "این متد با شروع از گروههای برگرداندهشده توسط :meth:`get_opcodes`، خوشههای تغییر کوچکتر را جدا میکند و بازههای میانی را که تغییری ندارند حذف میکند."
msgid "The groups are returned in the same format as :meth:`get_opcodes`."
msgstr "گروهها در همان قالب :meth:`get_opcodes` برگردانده میشوند."
msgid "Return a measure of the sequences' similarity as a float in the range [0, 1]."
msgstr "معیاری از شباهت دنبالهها را بهصورت یک عدد اعشاری در بازهی [۰، ۱] برمیگرداند."
msgid "Where T is the total number of elements in both sequences, and M is the number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the sequences are identical, and ``0.0`` if they have nothing in common."
msgstr "اگر T تعداد کل عناصر هر دو دنباله و M تعداد تطابقها باشد، این مقدار برابر با 2.0\\*M / T است. توجه داشته باشید که اگر دنبالهها یکسان باشند، این مقدار ``1.0`` است و اگر هیچ اشتراکی نداشته باشند، ``0.0`` است."
msgid "This is expensive to compute if :meth:`get_matching_blocks` or :meth:`get_opcodes` hasn't already been called, in which case you may want to try :meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound."
msgstr "محاسبهی این مقدار در صورتی پرهزینه است که :meth:`get_matching_blocks` یا :meth:`get_opcodes` از قبل فراخوانی نشده باشند؛ در این صورت ممکن است بخواهید ابتدا :meth:`quick_ratio` یا :meth:`real_quick_ratio` را امتحان کنید تا کران بالایی به دست آورید."
msgid "Return an upper bound on :meth:`ratio` relatively quickly."
msgstr "یک کران بالا برای :meth:`ratio` نسبتاً سریع برمیگرداند."
msgid "Return an upper bound on :meth:`ratio` very quickly."
msgstr "یک کران بالا برای :meth:`ratio` را بسیار سریع برمیگرداند."
msgid "The three methods that return the ratio of matching to total characters can give different results due to differing levels of approximation, although :meth:`~SequenceMatcher.quick_ratio` and :meth:`~SequenceMatcher.real_quick_ratio` are always at least as large as :meth:`~SequenceMatcher.ratio`:"
msgstr "سه متدی که نسبت نویسههای منطبق به کل نویسهها را برمیگردانند، میتوانند به دلیل سطوح متفاوت تقریب، نتایج متفاوتی داشته باشند، اگرچه :meth:`~SequenceMatcher.quick_ratio` و :meth:`~SequenceMatcher.real_quick_ratio` همواره دستکم به بزرگی :meth:`~SequenceMatcher.ratio` هستند:"
msgid "Examples"
msgstr "مثالها"
msgid "SequenceMatcher examples"
msgstr "مثالهای SequenceMatcher"
msgid "This example compares two strings, considering blanks to be \"junk\":"
msgstr "این مثال دو رشته را با در نظر گرفتن فاصلهها بهعنوان «زائد» مقایسه میکند:"
msgid ":meth:`~SequenceMatcher.ratio` returns a float in [0, 1], measuring the similarity of the sequences. As a rule of thumb, a :meth:`~SequenceMatcher.ratio` value over 0.6 means the sequences are close matches:"
msgstr ":meth:`~SequenceMatcher.ratio` یک عدد اعشاری در بازهی [۰، ۱] برمیگرداند که شباهت دنبالهها را میسنجد. بهعنوان یک قاعده سرانگشتی، مقدار :meth:`~SequenceMatcher.ratio` بیش از ۰٫۶ به این معناست که دنبالهها تطابقهای نزدیکی هستند:"
msgid "If you're only interested in where the sequences match, :meth:`~SequenceMatcher.get_matching_blocks` is handy:"
msgstr "اگر فقط به محل تطابق دنبالهها علاقهمند هستید، :meth:`~SequenceMatcher.get_matching_blocks` مفید است:"
msgid "Note that the last tuple returned by :meth:`~SequenceMatcher.get_matching_blocks` is always a dummy, ``(len(a), len(b), 0)``, and this is the only case in which the last tuple element (number of elements matched) is ``0``."
msgstr "توجه داشته باشید که آخرین چندگانهای که :meth:`~SequenceMatcher.get_matching_blocks` برمیگرداند همیشه یک چندگانه ساختگی، ``(len(a), len(b), 0)``، است و این تنها حالتی است که آخرین عنصر چندگانه (تعداد عناصر مطابقتدادهشده) برابر ``0`` است."
msgid "If you want to know how to change the first sequence into the second, use :meth:`~SequenceMatcher.get_opcodes`:"
msgstr "اگر میخواهید بدانید چگونه دنباله اول را به دنباله دوم تبدیل کنید، از :meth:`~SequenceMatcher.get_opcodes` استفاده کنید:"
msgid "The :func:`get_close_matches` function in this module which shows how simple code building on :class:`SequenceMatcher` can be used to do useful work."
msgstr "تابع :func:`get_close_matches` در این ماژول که نشان میدهد چگونه کد سادهای که بر پایهی :class:`SequenceMatcher` ساخته شده است، میتواند برای انجام کار مفید استفاده شود."
msgid "`Simple version control recipe <https://code.activestate.com/recipes/576729-simple-version-control/>`_ for a small application built with :class:`SequenceMatcher`."
msgstr "`دستور سادهی کنترل نسخه <https://code.activestate.com/recipes/576729-simple-version-control/>`_ برای یک برنامهی کوچک ساختهشده با :class:`SequenceMatcher`."
msgid "Differ example"
msgstr "مثال Differ"
msgid "This example compares two texts. First we set up the texts, sequences of individual single-line strings ending with newlines (such sequences can also be obtained from the :meth:`~io.IOBase.readlines` method of file-like objects):"
msgstr "این مثال دو متن را مقایسه میکند. ابتدا متنها را آماده میکنیم، دنبالههایی از رشتههای تکسطری جداگانه که با خط جدید پایان مییابند (چنین دنبالههایی را همچنین میتوان از متد :meth:`~io.IOBase.readlines` اشیای شبهپرونده به دست آورد):"
msgid "Next we instantiate a Differ object:"
msgstr "سپس یک شیء Differ را نمونهسازی میکنیم:"
msgid "Note that when instantiating a :class:`Differ` object we may pass functions to filter out line and character \"junk.\" See the :meth:`Differ` constructor for details."
msgstr "توجه داشته باشید که هنگام نمونهسازی یک شیء :class:`Differ`، میتوانید توابعی را برای فیلتر کردن «اضافات» خطی و نویسهای ارسال کنید. برای جزئیات، سازندهی :meth:`Differ` را ببینید."
msgid "Finally, we compare the two:"
msgstr "در نهایت، این دو را با هم مقایسه میکنیم:"
msgid "``result`` is a list of strings, so let's pretty-print it:"
msgstr "``result`` یک فهرست از رشتهها است، بنابراین بیایید آن را زیبانویسی کنیم (pretty-print):"
msgid "As a single multi-line string it looks like this:"
msgstr "بهصورت یک رشتهی چندخطی واحد، به این شکل است:"
msgid "A command-line interface to difflib"
msgstr "یک رابط خط فرمان برای difflib"
msgid "This example shows how to use difflib to create a ``diff``-like utility."
msgstr "این مثال نشان میدهد که چگونه از difflib برای ایجاد یک ابزار مشابه ``diff`` استفاده کنید."
msgid ""
"\"\"\" Command-line interface to difflib.py providing diffs in four formats:\n"
"\n"
"* ndiff: lists every line and highlights interline changes.\n"
"* context: highlights clusters of changes in a before/after format.\n"
"* unified: highlights clusters of changes in an inline format.\n"
"* html: generates side by side comparison with change highlights.\n"
"\n"
"\"\"\"\n"
"\n"
"import sys, os, difflib, argparse\n"
"import datetime as dt\n"
"\n"
"def file_mtime(path):\n"
" t = dt.datetime.fromtimestamp(os.stat(path).st_mtime,\n"
" dt.timezone.utc)\n"
" return t.astimezone().isoformat()\n"
"\n"
"def main():\n"
"\n"
" parser = argparse.ArgumentParser()\n"
" parser.add_argument('-c', action='store_true', default=False,\n"
" help='Produce a context format diff (default)')\n"
" parser.add_argument('-u', action='store_true', default=False,\n"
" help='Produce a unified format diff')\n"
" parser.add_argument('-m', action='store_true', default=False,\n"
" help='Produce HTML side by side diff '\n"
" '(can use -c and -l in conjunction)')\n"
" parser.add_argument('-n', action='store_true', default=False,\n"
" help='Produce a ndiff format diff')\n"
" parser.add_argument('-l', '--lines', type=int, default=3,\n"
" help='Set number of context lines (default 3)')\n"
" parser.add_argument('fromfile')\n"
" parser.add_argument('tofile')\n"
" options = parser.parse_args()\n"
"\n"
" n = options.lines\n"
" fromfile = options.fromfile\n"
" tofile = options.tofile\n"
"\n"
" fromdate = file_mtime(fromfile)\n"
" todate = file_mtime(tofile)\n"
" with open(fromfile) as ff:\n"
" fromlines = ff.readlines()\n"
" with open(tofile) as tf:\n"
" tolines = tf.readlines()\n"
"\n"
" if options.u:\n"
" diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)\n"
" elif options.n:\n"
" diff = difflib.ndiff(fromlines, tolines)\n"
" elif options.m:\n"
" diff = difflib.HtmlDiff().make_file(fromlines,tolines,fromfile,tofile,context=options.c,numlines=n)\n"
" else:\n"
" diff = difflib.context_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)\n"
"\n"
" sys.stdout.writelines(diff)\n"
"\n"
"if __name__ == '__main__':\n"
" main()\n"
msgstr ""
"\"\"\" Command-line interface to difflib.py providing diffs in four formats:\n"
"\n"
"* ndiff: lists every line and highlights interline changes.\n"
"* context: highlights clusters of changes in a before/after format.\n"
"* unified: highlights clusters of changes in an inline format.\n"
"* html: generates side by side comparison with change highlights.\n"
"\n"
"\"\"\"\n"
"\n"
"import sys, os, difflib, argparse\n"
"import datetime as dt\n"
"\n"
"def file_mtime(path):\n"
" t = dt.datetime.fromtimestamp(os.stat(path).st_mtime,\n"
" dt.timezone.utc)\n"
" return t.astimezone().isoformat()\n"
"\n"
"def main():\n"
"\n"
" parser = argparse.ArgumentParser()\n"
" parser.add_argument('-c', action='store_true', default=False,\n"
" help='Produce a context format diff (default)')\n"
" parser.add_argument('-u', action='store_true', default=False,\n"
" help='Produce a unified format diff')\n"
" parser.add_argument('-m', action='store_true', default=False,\n"
" help='Produce HTML side by side diff '\n"
" '(can use -c and -l in conjunction)')\n"
" parser.add_argument('-n', action='store_true', default=False,\n"
" help='Produce a ndiff format diff')\n"
" parser.add_argument('-l', '--lines', type=int, default=3,\n"
" help='Set number of context lines (default 3)')\n"
" parser.add_argument('fromfile')\n"
" parser.add_argument('tofile')\n"
" options = parser.parse_args()\n"
"\n"
" n = options.lines\n"
" fromfile = options.fromfile\n"
" tofile = options.tofile\n"
"\n"
" fromdate = file_mtime(fromfile)\n"
" todate = file_mtime(tofile)\n"
" with open(fromfile) as ff:\n"
" fromlines = ff.readlines()\n"
" with open(tofile) as tf:\n"
" tolines = tf.readlines()\n"
"\n"
" if options.u:\n"
" diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)\n"
" elif options.n:\n"
" diff = difflib.ndiff(fromlines, tolines)\n"
" elif options.m:\n"
" diff = difflib.HtmlDiff().make_file(fromlines,tolines,fromfile,tofile,context=options.c,numlines=n)\n"
" else:\n"
" diff = difflib.context_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)\n"
"\n"
" sys.stdout.writelines(diff)\n"
"\n"
"if __name__ == '__main__':\n"
" main()\n"
msgid "ndiff example"
msgstr "مثال ndiff"
msgid "This example shows how to use :func:`difflib.ndiff`."
msgstr "این مثال نشان میدهد که چگونه از :func:`difflib.ndiff` استفاده کنید."
msgid ""
"\"\"\"ndiff [-q] file1 file2\n"
" or\n"
"ndiff (-r1 | -r2) < ndiff_output > file1_or_file2\n"
"\n"
"Print a human-friendly file difference report to stdout. Both inter-\n"
"and intra-line differences are noted. In the second form, recreate file1\n"
"(-r1) or file2 (-r2) on stdout, from an ndiff report on stdin.\n"
"\n"
"In the first form, if -q (\"quiet\") is not specified, the first two lines\n"
"of output are\n"
"\n"
"-: file1\n"
"+: file2\n"
"\n"
"Each remaining line begins with a two-letter code:\n"
"\n"
" \"- \" line unique to file1\n"
" \"+ \" line unique to file2\n"
" \" \" line common to both files\n"
" \"? \" line not present in either input file\n"
"\n"
"Lines beginning with \"? \" attempt to guide the eye to intraline\n"
"differences, and were not present in either input file. These lines can be\n"
"confusing if the source files contain tab characters.\n"
"\n"
"The first file can be recovered by retaining only lines that begin with\n"
"\" \" or \"- \", and deleting those 2-character prefixes; use ndiff with -r1.\n"
"\n"
"The second file can be recovered similarly, but by retaining only \" \" and\n"
"\"+ \" lines; use ndiff with -r2; or, on Unix, the second file can be\n"
"recovered by piping the output through\n"
"\n"
" sed -n '/^[+ ] /s/^..//p'\n"
"\"\"\"\n"
"\n"
"__version__ = 1, 7, 0\n"
"\n"
"import difflib, sys\n"
"\n"
"def fail(msg):\n"
" out = sys.stderr.write\n"
" out(msg + \"\\n\\n\")\n"
" out(__doc__)\n"
" return 0\n"
"\n"
"# open a file & return the file object; gripe and return 0 if it\n"
"# couldn't be opened\n"
"def fopen(fname):\n"
" try:\n"
" return open(fname)\n"
" except IOError as detail:\n"
" return fail(\"couldn't open \" + fname + \": \" + str(detail))\n"
"\n"
"# open two files & spray the diff to stdout; return false iff a problem\n"
"def fcompare(f1name, f2name):\n"
" f1 = fopen(f1name)\n"
" f2 = fopen(f2name)\n"
" if not f1 or not f2:\n"
" return 0\n"
"\n"
" a = f1.readlines(); f1.close()\n"
" b = f2.readlines(); f2.close()\n"
" for line in difflib.ndiff(a, b):\n"
" print(line, end=' ')\n"
"\n"
" return 1\n"
"\n"
"# crack args (sys.argv[1:] is normal) & compare;\n"
"# return false iff a problem\n"
"\n"
"def main(args):\n"
" import getopt\n"
" try:\n"
" opts, args = getopt.getopt(args, \"qr:\")\n"
" except getopt.error as detail:\n"
" return fail(str(detail))\n"
" noisy = 1\n"
" qseen = rseen = 0\n"
" for opt, val in opts:\n"
" if opt == \"-q\":\n"
" qseen = 1\n"
" noisy = 0\n"
" elif opt == \"-r\":\n"
" rseen = 1\n"
" whichfile = val\n"
" if qseen and rseen:\n"
" return fail(\"can't specify both -q and -r\")\n"
" if rseen:\n"
" if args:\n"
" return fail(\"no args allowed with -r option\")\n"
" if whichfile in (\"1\", \"2\"):\n"
" restore(whichfile)\n"
" return 1\n"
" return fail(\"-r value must be 1 or 2\")\n"
" if len(args) != 2:\n"
" return fail(\"need 2 filename args\")\n"
" f1name, f2name = args\n"
" if noisy:\n"
" print('-:', f1name)\n"
" print('+:', f2name)\n"
" return fcompare(f1name, f2name)\n"
"\n"
"# read ndiff output from stdin, and print file1 (which=='1') or\n"
"# file2 (which=='2') to stdout\n"
"\n"
"def restore(which):\n"
" restored = difflib.restore(sys.stdin.readlines(), which)\n"
" sys.stdout.writelines(restored)\n"
"\n"
"if __name__ == '__main__':\n"
" main(sys.argv[1:])\n"
msgstr ""
"\"\"\"ndiff [-q] file1 file2\n"
" or\n"
"ndiff (-r1 | -r2) < ndiff_output > file1_or_file2\n"
"\n"
"Print a human-friendly file difference report to stdout. Both inter-\n"
"and intra-line differences are noted. In the second form, recreate file1\n"
"(-r1) or file2 (-r2) on stdout, from an ndiff report on stdin.\n"
"\n"
"In the first form, if -q (\"quiet\") is not specified, the first two lines\n"
"of output are\n"
"\n"
"-: file1\n"
"+: file2\n"
"\n"
"Each remaining line begins with a two-letter code:\n"
"\n"
" \"- \" line unique to file1\n"
" \"+ \" line unique to file2\n"
" \" \" line common to both files\n"
" \"? \" line not present in either input file\n"
"\n"
"Lines beginning with \"? \" attempt to guide the eye to intraline\n"
"differences, and were not present in either input file. These lines can be\n"
"confusing if the source files contain tab characters.\n"
"\n"
"The first file can be recovered by retaining only lines that begin with\n"
"\" \" or \"- \", and deleting those 2-character prefixes; use ndiff with -r1.\n"
"\n"
"The second file can be recovered similarly, but by retaining only \" \" and\n"
"\"+ \" lines; use ndiff with -r2; or, on Unix, the second file can be\n"
"recovered by piping the output through\n"
"\n"
" sed -n '/^[+ ] /s/^..//p'\n"
"\"\"\"\n"
"\n"
"__version__ = 1, 7, 0\n"
"\n"
"import difflib, sys\n"
"\n"
"def fail(msg):\n"
" out = sys.stderr.write\n"
" out(msg + \"\\n\\n\")\n"
" out(__doc__)\n"
" return 0\n"
"\n"
"# open a file & return the file object; gripe and return 0 if it\n"
"# couldn't be opened\n"
"def fopen(fname):\n"
" try:\n"
" return open(fname)\n"
" except IOError as detail:\n"
" return fail(\"couldn't open \" + fname + \": \" + str(detail))\n"
"\n"
"# open two files & spray the diff to stdout; return false iff a problem\n"
"def fcompare(f1name, f2name):\n"
" f1 = fopen(f1name)\n"
" f2 = fopen(f2name)\n"
" if not f1 or not f2:\n"
" return 0\n"
"\n"
" a = f1.readlines(); f1.close()\n"
" b = f2.readlines(); f2.close()\n"
" for line in difflib.ndiff(a, b):\n"
" print(line, end=' ')\n"
"\n"
" return 1\n"
"\n"
"# crack args (sys.argv[1:] is normal) & compare;\n"
"# return false iff a problem\n"
"\n"
"def main(args):\n"
" import getopt\n"
" try:\n"
" opts, args = getopt.getopt(args, \"qr:\")\n"
" except getopt.error as detail:\n"
" return fail(str(detail))\n"
" noisy = 1\n"
" qseen = rseen = 0\n"
" for opt, val in opts:\n"
" if opt == \"-q\":\n"
" qseen = 1\n"
" noisy = 0\n"
" elif opt == \"-r\":\n"
" rseen = 1\n"
" whichfile = val\n"
" if qseen and rseen:\n"
" return fail(\"can't specify both -q and -r\")\n"
" if rseen:\n"
" if args:\n"
" return fail(\"no args allowed with -r option\")\n"
" if whichfile in (\"1\", \"2\"):\n"
" restore(whichfile)\n"
" return 1\n"
" return fail(\"-r value must be 1 or 2\")\n"
" if len(args) != 2:\n"
" return fail(\"need 2 filename args\")\n"
" f1name, f2name = args\n"
" if noisy:\n"
" print('-:', f1name)\n"
" print('+:', f2name)\n"
" return fcompare(f1name, f2name)\n"
"\n"
"# read ndiff output from stdin, and print file1 (which=='1') or\n"
"# file2 (which=='2') to stdout\n"
"\n"
"def restore(which):\n"
" restored = difflib.restore(sys.stdin.readlines(), which)\n"
" sys.stdout.writelines(restored)\n"
"\n"
"if __name__ == '__main__':\n"
" main(sys.argv[1:])\n"