@@ -533,7 +533,7 @@ msgstr "config.py::"
533533
534534#: faq/programming.rst:270
535535msgid "x = 0 # Default value of the 'x' configuration setting"
536- msgstr "x = 0 # Προεπιλεγμένη τιμή της ρύθμισης διαμόρφωσης 'x'"
536+ msgstr "x = 0 # Default value of the 'x' configuration setting "
537537
538538#: faq/programming.rst:272
539539msgid "mod.py::"
@@ -720,9 +720,8 @@ msgid ""
720720" mydict[key] = value\n"
721721" return mydict"
722722msgstr ""
723- "def foo(mydict={}): # Προσοχή: κοινή αναφορά σε ένα dict για όλες τις "
724- "κλήσεις\n"
725- " ... υπολόγισε κάτι ...\n"
723+ "def foo(mydict={}): # Danger: shared reference to one dict for all calls\n"
724+ " ... compute something ...\n"
726725" mydict[key] = value\n"
727726" return mydict"
728727
@@ -794,7 +793,7 @@ msgid ""
794793msgstr ""
795794"def foo(mydict=None):\n"
796795" if mydict is None:\n"
797- " mydict = {} # δημιουργεί ένα νέο λεξικό του τοπικού χώρου ονομάτων "
796+ " mydict = {} # create a new dict for local namespace "
798797
799798#: faq/programming.rst:374
800799msgid ""
@@ -824,16 +823,15 @@ msgid ""
824823" _cache[(arg1, arg2)] = result # Store result in the cache\n"
825824" return result"
826825msgstr ""
827- "# Οι καλούντες μπορούν να παρέχουν μόνο δύο παραμέτρους και προαιρετικά να "
828- "περάσουν την _cache με λέξη-κλειδί \n"
826+ "# Callers can only provide two parameters and optionally pass _cache by "
827+ "keyword \n"
829828"def expensive(arg1, arg2, *, _cache={}):\n"
830829" if (arg1, arg2) in _cache:\n"
831830" return _cache[(arg1, arg2)]\n"
832831"\n"
833- " # Υπολόγισε την τιμή\n"
834- " result = ... ακριβής υπολογισμός ...\n"
835- " _cache[(arg1, arg2)] = result # Αποθηκεύει το αποτέλεσμα στην "
836- "προσωρινή μνήμη\n"
832+ " # Calculate the value\n"
833+ " result = ... expensive computation ...\n"
834+ " _cache[(arg1, arg2)] = result # Store result in the cache\n"
837835" return result"
838836
839837#: faq/programming.rst:389
@@ -997,10 +995,9 @@ msgid ""
997995">>> y\n"
998996"5"
999997msgstr ""
1000- ">>> x = 5 # οι ακέραιο είναι αμετάβλητοι \n"
998+ ">>> x = 5 # ints are immutable \n"
1001999">>> y = x\n"
1002- ">>> x = x + 1 # το 5 δεν μπορεί να μεταβληθεί, δημιουργούμε ένα νέο "
1003- "αντικείμενο εδώ\n"
1000+ ">>> x = x + 1 # 5 can't be mutated, we are creating a new object here\n"
10041001">>> x\n"
10051002"6\n"
10061003">>> y\n"
@@ -1133,9 +1130,9 @@ msgid ""
11331130"('new-value', 100)"
11341131msgstr ""
11351132">>> def func1(a, b):\n"
1136- "... a = 'new-value' # τα a και b είναι τοπικά ονόματα \n"
1137- "... b = b + 1 # εκχωρούνται σε νέα αντικείμενα \n"
1138- "... return a, b # επιστρέφει νέες τιμές \n"
1133+ "... a = 'new-value' # a and b are local names \n"
1134+ "... b = b + 1 # assigned to new objects \n"
1135+ "... return a, b # return new values \n"
11391136"...\n"
11401137">>> x, y = 'old-value', 99\n"
11411138">>> func1(x, y)\n"
@@ -1169,8 +1166,8 @@ msgid ""
11691166"['new-value', 100]"
11701167msgstr ""
11711168">>> def func2(a):\n"
1172- "... a[0] = 'new-value' # το 'a' αναφέρεται σε μια ευμετάβλητη λίστα \n"
1173- "... a[1] = a[1] + 1 # αλλάζει ένα κοινό αντικείμενο \n"
1169+ "... a[0] = 'new-value' # 'a' references a mutable list \n"
1170+ "... a[1] = a[1] + 1 # changes a shared object \n"
11741171"...\n"
11751172">>> args = ['old-value', 99]\n"
11761173">>> func2(args)\n"
@@ -1193,8 +1190,8 @@ msgid ""
11931190"{'a': 'new-value', 'b': 100}"
11941191msgstr ""
11951192">>> def func3(args):\n"
1196- "... args['a'] = 'new-value' # το args είναι ένα ευμετάβλητο λεξικό \n"
1197- "... args['b'] = args['b'] + 1 # το μεταβάλει στη θέση του \n"
1193+ "... args['a'] = 'new-value' # args is a mutable dictionary \n"
1194+ "... args['b'] = args['b'] + 1 # change it in-place \n"
11981195"...\n"
11991196">>> args = {'a': 'old-value', 'b': 99}\n"
12001197">>> func3(args)\n"
@@ -1227,9 +1224,8 @@ msgstr ""
12271224"... setattr(self, key, value)\n"
12281225"...\n"
12291226">>> def func4(args):\n"
1230- "... args.a = 'new-value' # τα args είναι ένα ευμετάβλητο "
1231- "Namespace\n"
1232- "... args.b = args.b + 1 # αλλάζει το αντικείμενο στη θέση του\n"
1227+ "... args.a = 'new-value' # args is a mutable Namespace\n"
1228+ "... args.b = args.b + 1 # change object in-place\n"
12331229"...\n"
12341230">>> args = Namespace(a='old-value', b=99)\n"
12351231">>> func4(args)\n"
@@ -1327,7 +1323,7 @@ msgid ""
13271323" return self.a * (x ** self.b)"
13281324msgstr ""
13291325"class exponential(linear):\n"
1330- " # το __init__ κληρονομείται \n"
1326+ " # __init__ inherited \n"
13311327" def __call__(self, x):\n"
13321328" return self.a * (x ** self.b)"
13331329
@@ -1653,15 +1649,15 @@ msgid ""
16531649msgstr ""
16541650"from functools import reduce\n"
16551651"\n"
1656- "# Περιττοί αριθμοί < 1000\n"
1652+ "# Primes < 1000\n"
16571653"print(list(filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0,\n"
16581654"map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000)))))\n"
16591655"\n"
1660- "# Οι πρώτοι 10 αριθμοί Fibonacci\n"
1656+ "# First 10 Fibonacci numbers \n"
16611657"print(list(map(lambda x,f=lambda x,f:(f(x-1,f)+f(x-2,f)) if x>1 else 1:\n"
16621658"f(x,f), range(10))))\n"
16631659"\n"
1664- "# Mandelbrot σύνολο \n"
1660+ "# Mandelbrot set \n"
16651661"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+'\\ n'+y,map(lambda "
16661662"y,\n"
16671663"Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,\n"
@@ -1670,11 +1666,11 @@ msgstr ""
16701666">=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"
16711667"64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy\n"
16721668"))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24))\n"
1673- "# \\ ___ ___/ \\ ___ ___/ | | |__ γραμμές στην οθόνη \n"
1674- "# V V | |______ λίστες στην οθόνη \n"
1675- "# | | |__________ μέγιστος αριθμός \" iterations\" \n"
1676- "# | |_________________ εύρος στον y άξονα \n"
1677- "# |____________________________ εύρος στον y άξονα "
1669+ "# \\ ___ ___/ \\ ___ ___/ | | |__ lines on screen \n"
1670+ "# V V | |______ columns on screen \n"
1671+ "# | | |__________ maximum of \" iterations\" \n"
1672+ "# | |_________________ range on y axis \n"
1673+ "# |____________________________ range on x axis "
16781674
16791675#: faq/programming.rst:771
16801676msgid "Don't try this at home, kids!"
@@ -2056,11 +2052,9 @@ msgstr ""
20562052"def b():\n"
20572053" pass\n"
20582054"\n"
2059- "dispatch = {'go': a, 'stop': b} # Σημειώστε την έλλειψη παρενθέσεων για τη "
2060- "συνάρτηση\n"
2055+ "dispatch = {'go': a, 'stop': b} # Note lack of parens for funcs\n"
20612056"\n"
2062- "dispatch[get_input()]() # Σημειώστε τις παρενθέσεις στο τέλος για την κλήση "
2063- "της συνάρτησης"
2057+ "dispatch[get_input()]() # Note trailing parens to call function"
20642058
20652059#: faq/programming.rst:957
20662060msgid "Use the built-in function :func:`getattr`::"
@@ -2619,7 +2613,7 @@ msgid ""
26192613" ... # do something with x ..."
26202614msgstr ""
26212615"for x in reversed(sequence):\n"
2622- " ... # κάνε κάτι με το x ..."
2616+ " ... # do something with x ..."
26232617
26242618#: faq/programming.rst:1197
26252619msgid ""
@@ -3358,20 +3352,19 @@ msgid ""
33583352"False"
33593353msgstr ""
33603354">>> c = C()\n"
3361- ">>> isinstance(c, C) # άμεσο \n"
3355+ ">>> isinstance(c, C) # direct \n"
33623356"True\n"
3363- ">>> isinstance(c, P) # έμμεσο \n"
3357+ ">>> isinstance(c, P) # indirect \n"
33643358"True\n"
3365- ">>> isinstance(c, Mapping) # εικονικό \n"
3359+ ">>> isinstance(c, Mapping) # virtual \n"
33663360"True\n"
33673361"\n"
3368- "# Πραγματική αλυσίδα κληρονομικότητας \n"
3362+ "# Actual inheritance chain \n"
33693363">>> type(c).__mro__\n"
33703364"(<class 'C'>, <class 'P'>, <class 'object'>)\n"
33713365"\n"
3372- "# Τεστ για \" αληθινή κληρονομιά \" \n"
3366+ "# Test for \" true inheritance \" \n"
33733367">>> Mapping in type(c).__mro__\n"
3374- "False"
33753368
33763369#: faq/programming.rst:1546
33773370msgid ""
@@ -3401,9 +3394,9 @@ msgid ""
34013394msgstr ""
34023395"def search(obj):\n"
34033396" if isinstance(obj, Mailbox):\n"
3404- " ... # κώδικας για αναζήτηση σε ένα mailbox\n"
3397+ " ... # code to search a mailbox\n"
34053398" elif isinstance(obj, Document):\n"
3406- " ... # κώδικας για αναζήτηση σε ένα έγγραφο \n"
3399+ " ... # code to search a document \n"
34073400" elif ..."
34083401
34093402#: faq/programming.rst:1560
@@ -3428,11 +3421,11 @@ msgid ""
34283421msgstr ""
34293422"class Mailbox:\n"
34303423" def search(self):\n"
3431- " ... # κώδικας για αναζήτηση σε ένα mailbox\n"
3424+ " ... # code to search a mailbox\n"
34323425"\n"
34333426"class Document:\n"
34343427" def search(self):\n"
3435- " ... # κώδικας για αναζήτηση σε ένα έγγραφο \n"
3428+ " ... # code to search a document \n"
34363429"\n"
34373430"obj.search()"
34383431
@@ -3552,7 +3545,7 @@ msgid ""
35523545msgstr ""
35533546"class X:\n"
35543547" def __setattr__(self, name, value):\n"
3555- " # Προσαρμοσμένη λογική εδώ ...\n"
3548+ " # Custom logic here ...\n"
35563549" object.__setattr__(self, name, value)"
35573550
35583551#: faq/programming.rst:1624
@@ -3583,7 +3576,7 @@ msgid ""
35833576msgstr ""
35843577"class Derived(Base):\n"
35853578" def meth(self):\n"
3586- " super().meth() # καλεί την Base.meth"
3579+ " super().meth() # calls Base.meth"
35873580
35883581#: faq/programming.rst:1637
35893582msgid ""
@@ -3667,13 +3660,13 @@ msgid ""
36673660" return C.count # or return self.count"
36683661msgstr ""
36693662"class C:\n"
3670- " count = 0 # αριθμός των φορών που καλείται το C.__init__\n"
3663+ " count = 0 # number of times C.__init__ called \n"
36713664"\n"
36723665" def __init__(self):\n"
36733666" C.count = C.count + 1\n"
36743667"\n"
36753668" def getcount(self):\n"
3676- " return C.count # or επιστρέφει το self.count"
3669+ " return C.count # or return self.count"
36773670
36783671#: faq/programming.rst:1678
36793672msgid ""
@@ -3717,7 +3710,7 @@ msgstr ""
37173710"class C:\n"
37183711" @staticmethod\n"
37193712" def static(arg1, arg2, arg3):\n"
3720- " # Όχι 'self' παράμετρος !\n"
3713+ " # No 'self' parameter !\n"
37213714" ..."
37223715
37233716#: faq/programming.rst:1697
@@ -3769,8 +3762,8 @@ msgid ""
37693762"}"
37703763msgstr ""
37713764"class C {\n"
3772- " C() { cout << \" Χωρίς παραμέτρους \\ n\" ; }\n"
3773- " C(int i) { cout << \" Η παράμετρος είναι \" << i << \"\\ n\" ; }\n"
3765+ " C() { cout << \" No arguments \\ n\" ; }\n"
3766+ " C(int i) { cout << \" Argument is \" << i << \"\\ n\" ; }\n"
37743767"}"
37753768
37763769#: faq/programming.rst:1722
@@ -4417,28 +4410,26 @@ msgid ""
44174410" # Depends on the station_id, date, and units."
44184411msgstr ""
44194412"class Weather:\n"
4420- " \" Αναζητήστε πληροφορίες για τον καιρό σε κυβερνητικό ιστότοπο \" \n"
4413+ " \" Lookup weather information on a government website \" \n"
44214414"\n"
44224415" def __init__(self, station_id):\n"
44234416" self._station_id = station_id\n"
4424- " # Το _station_id είναι ιδιωτικό και αμετάβλητο \n"
4417+ " # The _station_id is private and immutable \n"
44254418"\n"
44264419" def current_temperature(self):\n"
4427- " \" Τελευταία ωριαία παρατήρησης\" \n"
4428- " # Μην το αποθηκεύσετε στην προσωρινή μνήμη γιατί έχει παλιά "
4429- "αποτελέσματα\n"
4430- " # που μπορεί να είναι ξεπερασμένα.\n"
4420+ " \" Latest hourly observation\" \n"
4421+ " # Do not cache this because old results\n"
4422+ " # can be out of date.\n"
44314423"\n"
44324424" @cached_property\n"
44334425" def location(self):\n"
4434- " \" Επιστρέφει τις συντεταγμένες γεωγραφικού μήκους/γεωγραφικού "
4435- "πλάτους του σταθμού\" \n"
4436- " # Το αποτέλεσμα εξαρτάται μόνο από το station_id\n"
4426+ " \" Return the longitude/latitude coordinates of the station\" \n"
4427+ " # Result only depends on the station_id\n"
44374428"\n"
44384429" @lru_cache(maxsize=20)\n"
44394430" def historic_rainfall(self, date, units='mm'):\n"
4440- " \" Βροχόπτωση σε μια δεδομένη ημερομηνία \" \n"
4441- " # Εξαρτάται από το station_id, ημέρα, και από τις μονάδες ."
4431+ " \" Rainfall on a given date \" \n"
4432+ " # Depends on the station_id, date, and units ."
44424433
44434434#: faq/programming.rst:2044
44444435msgid ""
@@ -4911,10 +4902,10 @@ msgid ""
49114902msgstr ""
49124903">>> import importlib\n"
49134904">>> import cls\n"
4914- ">>> c = cls.C() # Δημιουργεί ένα στιγμιότυπο του C\n"
4905+ ">>> c = cls.C() # Create an instance of C\n"
49154906">>> importlib.reload(cls)\n"
49164907"<module 'cls' from 'cls.py'>\n"
4917- ">>> isinstance(c, cls.C) # isinstance είναι ψευδής ?!?\n"
4908+ ">>> isinstance(c, cls.C) # isinstance is false ?!?\n"
49184909"False"
49194910
49204911#: faq/programming.rst:2239
0 commit comments