@@ -663,7 +663,7 @@ msgid ""
663663msgstr ""
664664"def foo(mydict=None):\n"
665665" if mydict is None:\n"
666- " mydict = {} # ایجاد یک دیکشنری جدید برای فضای نام محلی "
666+ " mydict = {} # create a new dict for local namespace "
667667
668668msgid ""
669669"This feature can be useful. When you have a function that's time-consuming to "
@@ -689,15 +689,15 @@ msgid ""
689689" _cache[(arg1, arg2)] = result # Store result in the cache\n"
690690" return result"
691691msgstr ""
692- "# فراخوانندگان فقط میتوانند دو پارامتر ارائه دهند و _cache را بهصورت اختیاری با "
693- "کلیدواژه ارسال کنند \n"
692+ "# Callers can only provide two parameters and optionally pass _cache by "
693+ "keyword \n"
694694"def expensive(arg1, arg2, *, _cache={}):\n"
695695" if (arg1, arg2) in _cache:\n"
696696" return _cache[(arg1, arg2)]\n"
697697"\n"
698- " # مقدار را محاسبه کنید \n"
698+ " # Calculate the value \n"
699699" result = ... expensive computation ...\n"
700- " _cache[(arg1, arg2)] = result # نتیجه را در نهانگاه ذخیره کنید \n"
700+ " _cache[(arg1, arg2)] = result # Store result in the cache \n"
701701" return result"
702702
703703msgid ""
@@ -1405,27 +1405,27 @@ msgid ""
14051405msgstr ""
14061406"from functools import reduce\n"
14071407"\n"
1408- "# اعداد اول کوچکتر از ۱۰۰۰ \n"
1408+ "# Primes < 1000 \n"
14091409"print(list(filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0,\n"
14101410"map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000)))))\n"
14111411"\n"
1412- "# نخستین ۱۰ عدد فیبوناچی \n"
1412+ "# First 10 Fibonacci numbers \n"
14131413"print(list(map(lambda x,f=lambda x,f:(f(x-1,f)+f(x-2,f)) if x>1 else 1:\n"
14141414"f(x,f), range(10))))\n"
14151415"\n"
1416- "# مجموعهی مندلبرو \n"
1416+ "# Mandelbrot set \n"
14171417"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+'\\ n'+y,map(lambda y,\n"
14181418"Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,\n"
14191419"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,\n"
14201420"i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y\n"
14211421">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(\n"
14221422"64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy\n"
14231423"))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24))\n"
1424- "# \\ ___ ___/ \\ ___ ___/ | | |__ سطرهای صفحه \n"
1425- "# V V | |______ ستونهای صفحه \n"
1426- "# | | |__________ بیشینهی «تکرارها» \n"
1427- "# | |_________________ بازهی محور y \n"
1428- "# |____________________________ بازهی محور x "
1424+ "# \\ ___ ___/ \\ ___ ___/ | | |__ lines on screen \n"
1425+ "# V V | |______ columns on screen \n"
1426+ "# | | |__________ maximum of \" iterations \" \n"
1427+ "# | |_________________ range on y axis \n"
1428+ "# |____________________________ range on x axis "
14291429
14301430msgid "Don't try this at home, kids!"
14311431msgstr "بچهها، این کار را در خانه امتحان نکنید!"
@@ -1752,9 +1752,9 @@ msgstr ""
17521752"def b():\n"
17531753" pass\n"
17541754"\n"
1755- "dispatch = {'go': a, 'stop': b} # توجه: نبود پرانتز برای توابع \n"
1755+ "dispatch = {'go': a, 'stop': b} # Note lack of parens for funcs \n"
17561756"\n"
1757- "dispatch[get_input()]() # توجه: پرانتز پایانی برای فراخوانی تابع "
1757+ "dispatch[get_input()]() # Note trailing parens to call function "
17581758
17591759msgid "Use the built-in function :func:`getattr`::"
17601760msgstr "از تابع توکار :func:`getattr` استفاده کنید::"
0 commit comments