-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathintroduction.po
More file actions
732 lines (650 loc) · 31.7 KB
/
Copy pathintroduction.po
File metadata and controls
732 lines (650 loc) · 31.7 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2019, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-30 08:10+0200\n"
"PO-Revision-Date: 2019-04-22 09:19+0200\n"
"Last-Translator: Alessandro Cucci <alessandro.cucci@gmail.com>\n"
"Language-Team: \n"
"Language: it_IT\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 2.2.1\n"
#: tutorial/introduction.rst:5
msgid "An Informal Introduction to Python"
msgstr "Un'introduzione informale a Python"
#: tutorial/introduction.rst:7
msgid ""
"In the following examples, input and output are distinguished by the "
"presence or absence of prompts (:term:`>>>` and :term:`...`): to repeat the "
"example, you must type everything after the prompt, when the prompt appears; "
"lines that do not begin with a prompt are output from the interpreter. Note "
"that a secondary prompt on a line by itself in an example means you must "
"type a blank line; this is used to end a multi-line command."
msgstr ""
"Nei seguenti esempi, input e output si distinguono per la presenza o meno "
"del prompt (:term:`>>>` e :term:`...`): per ripetere l'esempio, è necessario "
"digitare tutto dopo il prompt, quando questo è presente; le righe che non "
"iniziano con un prompt vengono emesse dall'interprete. Si noti che un prompt "
"secondario su una linea da solo in un esempio significa che è necessario "
"digitare una riga vuota; questo viene utilizzato per terminare un comando a "
"più righe."
#: tutorial/introduction.rst:16
msgid ""
"You can toggle the display of prompts and output by clicking on ``>>>`` in "
"the upper-right corner of an example box. If you hide the prompts and "
"output for an example, then you can easily copy and paste the input lines "
"into your interpreter."
msgstr ""
"Puoi attivare o disattivare la visualizzazione dei prompt e dell'output "
"facendo clic su ``>>>`` nell'angolo in alto a destra di un riquadro di "
"esempio. Se nascondi i prompt e l'output di un esempio, potrai copiare e "
"incollare facilmente le righe di input nel tuo interprete."
#: tutorial/introduction.rst:23
msgid ""
"Many of the examples in this manual, even those entered at the interactive "
"prompt, include comments. Comments in Python start with the hash character, "
"``#``, and extend to the end of the physical line. A comment may appear at "
"the start of a line or following whitespace or code, but not within a string "
"literal. A hash character within a string literal is just a hash character. "
"Since comments are to clarify code and are not interpreted by Python, they "
"may be omitted when typing in examples."
msgstr ""
"Molti degli esempi di questo manuale, anche quelli inseriti al prompt "
"interattivo, includono commenti. I commenti in Python iniziano con il "
"carattere *hash*, ``#``, e si estendono fino alla fine della riga. Un "
"commento può apparire all'inizio di una riga o dopo uno spazio bianco o "
"codice, ma non all'interno di una stringa. Un carattere hash all'interno di "
"una stringa letterale è solo un carattere. Poiché i commenti servono solo a "
"chiarire il codice e non sono interpretati da Python, possono essere omessi "
"quando si scrivono gli esempi."
#: tutorial/introduction.rst:31
msgid "Some examples::"
msgstr "Alcuni esempi::"
#: tutorial/introduction.rst:42
msgid "Using Python as a Calculator"
msgstr "Usare Python come calcolatrice"
#: tutorial/introduction.rst:44
msgid ""
"Let's try some simple Python commands. Start the interpreter and wait for "
"the primary prompt, ``>>>``. (It shouldn't take long.)"
msgstr ""
"Proviamo con alcuni semplici comandi di Python. Avviare l'interprete e "
"attendere il prompt primario, ``>>>``. (Non dovrebbe volerci molto.)"
#: tutorial/introduction.rst:51
msgid "Numbers"
msgstr "Numeri"
#: tutorial/introduction.rst:53
msgid ""
"The interpreter acts as a simple calculator: you can type an expression at "
"it and it will write the value. Expression syntax is straightforward: the "
"operators ``+``, ``-``, ``*`` and ``/`` can be used to perform arithmetic; "
"parentheses (``()``) can be used for grouping. For example::"
msgstr ""
"L'interprete agisce come una semplice calcolatrice: è possibile digitare "
"un'espressione per scrivere il valore. La sintassi dell'espressione è "
"semplice: gli operatori ``+``, ``-``, ``*`` e ``/`` funzionano come nella "
"maggior parte degli altri linguaggi (per esempio, Pascal o C); le parentesi "
"(``()``) possono essere utilizzate per il raggruppamento. Per esempio::"
#: tutorial/introduction.rst:68
msgid ""
"The integer numbers (e.g. ``2``, ``4``, ``20``) have type :class:`int`, the "
"ones with a fractional part (e.g. ``5.0``, ``1.6``) have type :class:"
"`float`. We will see more about numeric types later in the tutorial."
msgstr ""
"I numeri interi (es. ``2``, ``4``, ``20``) hanno tipo :class:`int`, quelli "
"in virgola mobile (es. ``5.0``, ``1.6``) hanno tipo :class:`float`. "
"Torneremo a parlare ancora dei tipi numerici più avanti nel tutorial."
#: tutorial/introduction.rst:72
msgid ""
"Division (``/``) always returns a float. To do :term:`floor division` and "
"get an integer result you can use the ``//`` operator; to calculate the "
"remainder you can use ``%``::"
msgstr ""
"La divisione (``/``) restituisce sempre un float. Per fare :term:`floor "
"division` e ottenere un risultato intero (scartando qualsiasi cifra "
"decimale) si può usare l'operatore ``//``; per calcolare il resto si può "
"usare ``%``::"
#: tutorial/introduction.rst:86
msgid ""
"With Python, it is possible to use the ``**`` operator to calculate powers "
"[#]_::"
msgstr ""
"Con Python, è possibile utilizzare l'operatore ``**`` per calcolare le "
"potenze [#]_::"
#: tutorial/introduction.rst:93
msgid ""
"The equal sign (``=``) is used to assign a value to a variable. Afterwards, "
"no result is displayed before the next interactive prompt::"
msgstr ""
"Il segno uguale (``=``) è usato per assegnare un valore ad una variabile. "
"Successivamente, nessun risultato viene visualizzato prima della successiva "
"richiesta::"
#: tutorial/introduction.rst:101
msgid ""
"If a variable is not \"defined\" (assigned a value), trying to use it will "
"give you an error::"
msgstr ""
"Se una variabile non è stata ”definita\" (a cui è stato assegnato un "
"valore), usarla vi darà un errore::"
#: tutorial/introduction.rst:109
msgid ""
"There is full support for floating point; operators with mixed type operands "
"convert the integer operand to floating point::"
msgstr ""
"C'è pieno supporto per i numeri in virgola mobile; gli operatori con "
"operandi di tipo misto convertono l'intero in un numero in virgola mobile::"
#: tutorial/introduction.rst:115
msgid ""
"In interactive mode, the last printed expression is assigned to the variable "
"``_``. This means that when you are using Python as a desk calculator, it "
"is somewhat easier to continue calculations, for example::"
msgstr ""
"In modalità interattiva, l'ultima espressione stampata viene assegnata alla "
"variabile ``_``. Questo significa che quando si utilizza Python come "
"calcolatrice da tavolo, è un po' più facile continuare i calcoli, ad "
"esempio::"
#: tutorial/introduction.rst:128
msgid ""
"This variable should be treated as read-only by the user. Don't explicitly "
"assign a value to it --- you would create an independent local variable with "
"the same name masking the built-in variable with its magic behavior."
msgstr ""
"Questa variabile deve essere trattata dall'utente in sola lettura. Non va "
"assegnato esplicitamente un valore ad essa --- si dovrebbe invece creare una "
"variabile locale indipendente con lo stesso nome, mascherando così la "
"variabile *built-in* e il suo comportamento magico."
#: tutorial/introduction.rst:132
msgid ""
"In addition to :class:`int` and :class:`float`, Python supports other types "
"of numbers, such as :class:`~decimal.Decimal` and :class:`~fractions."
"Fraction`. Python also has built-in support for :ref:`complex numbers "
"<typesnumeric>`, and uses the ``j`` or ``J`` suffix to indicate the "
"imaginary part (e.g. ``3+5j``)."
msgstr ""
"Oltre a :class:`int` e :class:`float`, Python supporta altri tipi di numeri, "
"come :class:`~decimal.Decimal` e :class:`~fractions.Fraction`. Python ha "
"anche il supporto incorporato per :ref:`complex numbers <typesnumeric>`, e "
"usa il suffisso ``j`` o ``J`` per indicare la parte immaginaria (es. "
"``3+5j``)."
#: tutorial/introduction.rst:142
msgid "Text"
msgstr "Testo"
#: tutorial/introduction.rst:144
msgid ""
"Python can manipulate text (represented by type :class:`str`, so-called "
"\"strings\") as well as numbers. This includes characters \"``!``\", words "
"\"``rabbit``\", names \"``Paris``\", sentences \"``Got your back.``\", etc. "
"\"``Yay! :)``\". They can be enclosed in single quotes (``'...'``) or double "
"quotes (``\"...\"``) with the same result [#]_."
msgstr ""
"Python può manipolare testo (rappresentato dal tipo :class:`str`, le "
"cosiddette \"stringhe\") così come numeri. Questo include caratteri \"``!"
"``\", parole \"``rabbit``\", nomi \"``Paris``\", frasi \"``Got your back."
"``\", ecc. \"``Yay! :)``\". Possono essere racchiusi tra virgolette singole "
"(``'...'``) o virgolette doppie (``\"...\"``) con lo stesso risultato [#]_."
#: tutorial/introduction.rst:157
msgid ""
"To quote a quote, we need to \"escape\" it, by preceding it with ``\\``. "
"Alternatively, we can use the other type of quotation marks::"
msgstr ""
"racchiudere una virgoletta dello stesso tipo, dobbiamo farne l'\"escape\", "
"precedendola con ``\\``. In alternativa, possiamo usare l'altro tipo di "
"virgolette::"
#: tutorial/introduction.rst:171
msgid ""
"In the Python shell, the string definition and output string can look "
"different. The :func:`print` function produces a more readable output, by "
"omitting the enclosing quotes and by printing escaped and special "
"characters::"
msgstr ""
"Nella shell di Python, la definizione di una stringa e la stringa di output "
"possono apparire differenti. La funzione :func:`print` produce un output più "
"leggibile, omettendo le virgolette di chiusura e stampando i caratteri con "
"escape e speciali::"
#: tutorial/introduction.rst:182
msgid ""
"If you don't want characters prefaced by ``\\`` to be interpreted as special "
"characters, you can use *raw strings* by adding an ``r`` before the first "
"quote::"
msgstr ""
"Se non si desidera che i caratteri preceduti da ``\\`` siano interpretati "
"come caratteri speciali, è possibile utilizzare le cosiddette *raw strings* "
"aggiungendo un ``r`` prima del primo apice::"
#: tutorial/introduction.rst:192
msgid ""
"There is one subtle aspect to raw strings: a raw string may not end in an "
"odd number of ``\\`` characters; see :ref:`the FAQ entry <faq-programming-"
"raw-string-backslash>` for more information and workarounds."
msgstr ""
"C'è un aspetto sottile nelle stringhe raw: una stringa raw non può terminare "
"con un numero dispari di caratteri ``\\``; vedi :ref:`la voce FAQ <faq-"
"programming-raw-string-backslash>` per ulteriori informazioni e soluzioni."
#: tutorial/introduction.rst:197
msgid ""
"String literals can span multiple lines. One way is using triple-quotes: "
"``\"\"\"...\"\"\"`` or ``'''...'''``. End of lines are automatically "
"included in the string, but it's possible to prevent this by adding a ``\\`` "
"at the end of the line. The following example::"
msgstr ""
"Le lettere letterali delle stringhe possono estendersi su più linee. Un "
"modo è quello di usare gli apici tripli: ``\"\"\"...\"\"\"`` o "
"``'''...'''``. La fine delle linee sono automaticamente incluse nella "
"stringa, ma è possibile evitare che ciò avvenga aggiungendo un ``\\`` alla "
"fine della linea. Il seguente esempio::"
#: tutorial/introduction.rst:208
msgid ""
"produces the following output (note that the initial newline is not "
"included):"
msgstr ""
"produce il seguente output (si noti che la nuova linea iniziale non è "
"inclusa):"
#: tutorial/introduction.rst:216
msgid ""
"Strings can be concatenated (glued together) with the ``+`` operator, and "
"repeated with ``*``::"
msgstr ""
"Le stringhe possono essere concatenate (incollate insieme) con l'operatore "
"``+`` e ripetute con ``*``::"
#: tutorial/introduction.rst:223
msgid ""
"Two or more *string literals* (i.e. the ones enclosed between quotes) next "
"to each other are automatically concatenated. ::"
msgstr ""
"Due o più *letterali di tipo stringa* (cioè quelli racchiusi tra virgolette) "
"posizionati uno accanto all'altro sono automaticamente concatenati. ::"
#: tutorial/introduction.rst:229
msgid ""
"This feature is particularly useful when you want to break long strings::"
msgstr ""
"Questa funzione è particolarmente utile quando si vogliono separare stringhe "
"lunghe::"
#: tutorial/introduction.rst:236
msgid ""
"This only works with two literals though, not with variables or expressions::"
msgstr ""
"Questo funziona solo con due letterali, ma non con variabili o *expression*::"
#: tutorial/introduction.rst:250
msgid ""
"If you want to concatenate variables or a variable and a literal, use ``+``::"
msgstr ""
"Se volete concatenare variabili o una variabile e un letterale, usate ``+``::"
#: tutorial/introduction.rst:255
msgid ""
"Strings can be *indexed* (subscripted), with the first character having "
"index 0. There is no separate character type; a character is simply a string "
"of size one::"
msgstr ""
"Le stringhe possono essere *indicizzate* (sottoscritte), e il primo "
"carattere ha indice 0. Non esiste un tipo carattere specifico; un carattere "
"è semplicemente una stringa di dimensione uno::"
#: tutorial/introduction.rst:265
msgid ""
"Indices may also be negative numbers, to start counting from the right::"
msgstr ""
"Gli indici possono anche essere numeri negativi, per iniziare a contare da "
"destra::"
#: tutorial/introduction.rst:274
msgid "Note that since -0 is the same as 0, negative indices start from -1."
msgstr "N.B. Poiché -0 è uguale a 0, gli indici negativi partono da -1."
#: tutorial/introduction.rst:276
msgid ""
"In addition to indexing, *slicing* is also supported. While indexing is "
"used to obtain individual characters, *slicing* allows you to obtain a "
"substring::"
msgstr ""
"Oltre all'indicizzazione, è supportato anche lo *slicing*. Mentre "
"l'indicizzazione è usata per ottenere i singoli caratteri, lo *slicing* "
"permette di ottenere una sottostringa::"
#: tutorial/introduction.rst:284
msgid ""
"Slice indices have useful defaults; an omitted first index defaults to zero, "
"an omitted second index defaults to the size of the string being sliced. ::"
msgstr ""
"Nello slice gli indici hanno degli utili valori predefiniti; un primo indice "
"omesso è zero, un secondo indice omesso è uguale alla dimensione della "
"stringa che si sta tagliando:"
#: tutorial/introduction.rst:294
msgid ""
"Note how the start is always included, and the end always excluded. This "
"makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::"
msgstr ""
"Si noti come l'inizio sia sempre incluso, e la fine sempre esclusa. Questo "
"fa sì che ``s[:i] + s[i:]`` è sempre uguale a ``s``::"
#: tutorial/introduction.rst:302
msgid ""
"One way to remember how slices work is to think of the indices as pointing "
"*between* characters, with the left edge of the first character numbered 0. "
"Then the right edge of the last character of a string of *n* characters has "
"index *n*, for example::"
msgstr ""
"Un modo per ricordare come funzionano le fette è quello di pensare agli "
"indici come al punto *tra* caratteri, con il bordo sinistro del primo "
"carattere numerato 0. Poi il bordo destro dell'ultimo carattere di una "
"stringa di caratteri *n* ha l'indice *n*, per esempio::"
#: tutorial/introduction.rst:313
msgid ""
"The first row of numbers gives the position of the indices 0...6 in the "
"string; the second row gives the corresponding negative indices. The slice "
"from *i* to *j* consists of all characters between the edges labeled *i* and "
"*j*, respectively."
msgstr ""
"La prima riga di numeri dà la posizione degli indici 0...6 nella stringa; la "
"seconda riga dà i corrispondenti indici negativi. La porzione da *i* a *j* è "
"costituita da tutti i caratteri tra i bordi contrassegnati rispettivamente "
"con *i* e *j*."
#: tutorial/introduction.rst:318
msgid ""
"For non-negative indices, the length of a slice is the difference of the "
"indices, if both are within bounds. For example, the length of "
"``word[1:3]`` is 2."
msgstr ""
"Per gli indici non negativi, la lunghezza di una fetta è la differenza degli "
"indici, se entrambi sono entro i limiti. Per esempio, la lunghezza di "
"``word[1:3]`` è 2."
#: tutorial/introduction.rst:322
msgid "Attempting to use an index that is too large will result in an error::"
msgstr ""
"Il tentativo di utilizzare un indice troppo grande comporta un errore::"
#: tutorial/introduction.rst:329
msgid ""
"However, out of range slice indexes are handled gracefully when used for "
"slicing::"
msgstr ""
"Tuttavia, gli indici delle sottostringhe fuori *range* (che superano la "
"lunghezza della stringa) sono gestiti a modo quando vengono utilizzati per "
"l'affettamento::"
#: tutorial/introduction.rst:337
msgid ""
"Python strings cannot be changed --- they are :term:`immutable`. Therefore, "
"assigning to an indexed position in the string results in an error::"
msgstr ""
"Le stringhe Python non possono essere modificate --- sono :term:`immutable`. "
"Pertanto, l'assegnazione di una posizione indicizzata nella stringa comporta "
"un errore::"
#: tutorial/introduction.rst:349
msgid "If you need a different string, you should create a new one::"
msgstr "Se avete bisogno di una stringa diversa, dovreste crearne una nuova::"
#: tutorial/introduction.rst:356
msgid "The built-in function :func:`len` returns the length of a string::"
msgstr ""
"La funzione integrata :func:`len` restituisce la lunghezza di una stringa::"
#: tutorial/introduction.rst:365
msgid ":ref:`textseq`"
msgstr ":ref:`textseq`"
#: tutorial/introduction.rst:366
msgid ""
"Strings are examples of *sequence types*, and support the common operations "
"supported by such types."
msgstr ""
"Le stringhe sono esempi di *tipi di sequenze*, e supportano le operazioni "
"comuni supportate da questi tipi di dato."
#: tutorial/introduction.rst:369
msgid ":ref:`string-methods`"
msgstr ":ref:`string-methods`"
#: tutorial/introduction.rst:370
msgid ""
"Strings support a large number of methods for basic transformations and "
"searching."
msgstr ""
"Un gran numero di metodi per le trasformazioni di base e la ricerca sono "
"supportati dalle stringhe."
#: tutorial/introduction.rst:373
msgid ":ref:`f-strings`"
msgstr ":ref:`f-strings`"
#: tutorial/introduction.rst:374
msgid "String literals that have embedded expressions."
msgstr "Stringhe con *expression* incorporate."
#: tutorial/introduction.rst:376
msgid ":ref:`formatstrings`"
msgstr ":ref:`formatstrings`"
#: tutorial/introduction.rst:377
msgid "Information about string formatting with :meth:`str.format`."
msgstr ""
"Informazioni sulla formattazione delle stringhe con :meth:`str.format`."
#: tutorial/introduction.rst:379
msgid ":ref:`old-string-formatting`"
msgstr ":ref:`old-string-formatting`"
#: tutorial/introduction.rst:380
msgid ""
"The old formatting operations invoked when strings are the left operand of "
"the ``%`` operator are described in more detail here."
msgstr ""
"Il vecchio metodo di formattazione, quello che prevede un template a "
"sinistra dell'operatore ``%`` è descritto più dettagliatamente qui."
#: tutorial/introduction.rst:387
msgid "Lists"
msgstr "Liste"
#: tutorial/introduction.rst:389
msgid ""
"Python knows a number of *compound* data types, used to group together other "
"values. The most versatile is the *list*, which can be written as a list of "
"comma-separated values (items) between square brackets. Lists might contain "
"items of different types, but usually the items all have the same type. ::"
msgstr ""
"Python conosce un certo numero di tipi di dati *composti*, usati per "
"raggruppare altri valori. La più versatile è la *lista*, che può essere "
"scritta come una lista di valori separati da virgola (elementi) tra "
"parentesi quadre. Gli elenchi possono contenere elementi di tipo diverso, "
"ma di solito gli elementi hanno tutti lo stesso tipo. ::"
#: tutorial/introduction.rst:398
msgid ""
"Like strings (and all other built-in :term:`sequence` types), lists can be "
"indexed and sliced::"
msgstr ""
"Come le stringhe (e tutti gli altri tipi built-in :term:`sequence`), le "
"liste possono essere indicizzate e tagliate::"
#: tutorial/introduction.rst:408
msgid "Lists also support operations like concatenation::"
msgstr "Gli elenchi supportano anche operazioni come la concatenazione::"
#: tutorial/introduction.rst:413
msgid ""
"Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` "
"type, i.e. it is possible to change their content::"
msgstr ""
"A differenza delle stringhe, che sono :term:`immutable`, le liste sono di "
"tipo :term:`mutable`, cioè è possibile modificarne il contenuto::"
#: tutorial/introduction.rst:423
msgid ""
"You can also add new items at the end of the list, by using the :meth:`!list."
"append` *method* (we will see more about methods later)::"
msgstr ""
"Potete anche aggiungere nuovi elementi alla fine della lista, usando il "
"*metodo* :meth:`!list.append` (vedremo di più riguardo i metodi più avanti)::"
#: tutorial/introduction.rst:431
msgid ""
"Simple assignment in Python never copies data. When you assign a list to a "
"variable, the variable refers to the *existing list*. Any changes you make "
"to the list through one variable will be seen through all other variables "
"that refer to it.::"
msgstr ""
"L'assegnazione semplice in Python non copia mai i dati. Quando assegni una "
"lista a una variabile, la variabile si riferisce alla *lista esistente*. "
"Qualsiasi modifica apportata alla lista tramite una variabile sarà visibile "
"attraverso tutte le altre variabili che si riferiscono ad essa.::"
#: tutorial/introduction.rst:444
msgid ""
"All slice operations return a new list containing the requested elements. "
"This means that the following slice returns a :ref:`shallow copy "
"<shallow_vs_deep_copy>` of the list::"
msgstr ""
"Tutte le operazioni di taglio restituiscono una nuova lista contenente gli "
"elementi richiesti. Ciò significa che la seguente sezione restituisce una "
"nuova :ref:`shallow copy <shallow_vs_deep_copy>` della list::"
#: tutorial/introduction.rst:455
msgid ""
"Assignment to slices is also possible, and this can even change the size of "
"the list or clear it entirely::"
msgstr ""
"L'assegnazione a uno slice è anche possibile, per cambiare anche la "
"dimensione della lista o cancellarne gli elementi completamente::"
#: tutorial/introduction.rst:474
msgid "The built-in function :func:`len` also applies to lists::"
msgstr "La funzione :func:`len` si applica anche alle liste::"
#: tutorial/introduction.rst:480
msgid ""
"It is possible to nest lists (create lists containing other lists), for "
"example::"
msgstr ""
"E' possibile nidificare liste (creare liste contenenti altre liste), ad "
"esempio::"
#: tutorial/introduction.rst:496
msgid "First Steps Towards Programming"
msgstr "Primi passi di programmazione"
#: tutorial/introduction.rst:498
msgid ""
"Of course, we can use Python for more complicated tasks than adding two and "
"two together. For instance, we can write an initial sub-sequence of the "
"`Fibonacci series <https://en.wikipedia.org/wiki/Fibonacci_sequence>`_ as "
"follows::"
msgstr ""
"Naturalmente, possiamo usare Python per compiti più complicati che sommare "
"insieme due più due. Per esempio, possiamo scrivere una prima sottosequenza "
"della `Successione di Fibonacci <https://it.wikipedia.org/wiki/"
"Successione_di_Fibonacci>`_ come segue::"
#: tutorial/introduction.rst:518
msgid "This example introduces several new features."
msgstr "Questo esempio introduce diverse nuove funzionalità."
#: tutorial/introduction.rst:520
msgid ""
"The first line contains a *multiple assignment*: the variables ``a`` and "
"``b`` simultaneously get the new values 0 and 1. On the last line this is "
"used again, demonstrating that the expressions on the right-hand side are "
"all evaluated first before any of the assignments take place. The right-"
"hand side expressions are evaluated from the left to the right."
msgstr ""
"La prima riga contiene una *assegnazione multipla*: le variabili ``a`` e "
"``b`` ottengono simultaneamente i nuovi valori 0 e 1. Sull'ultima riga viene "
"usata di nuovo, dimostrando che le espressioni sul lato destro sono tutte "
"valutate prima di una qualsiasi delle assegnazioni. Le espressioni del lato "
"destro sono valutate da sinistra a destra."
#: tutorial/introduction.rst:526
msgid ""
"The :keyword:`while` loop executes as long as the condition (here: ``a < "
"10``) remains true. In Python, like in C, any non-zero integer value is "
"true; zero is false. The condition may also be a string or list value, in "
"fact any sequence; anything with a non-zero length is true, empty sequences "
"are false. The test used in the example is a simple comparison. The "
"standard comparison operators are written the same as in C: ``<`` (less "
"than), ``>`` (greater than), ``==`` (equal to), ``<=`` (less than or equal "
"to), ``>=`` (greater than or equal to) and ``!=`` (not equal to)."
msgstr ""
"Il ciclo :keyword:`while` viene eseguito finché la condizione (qui: ``a < "
"10``) rimane vera. In Python, come in C, qualsiasi valore intero diverso da "
"zero è vero; zero è falso. La condizione può anche essere una stringa o un "
"valore di lista, infatti qualsiasi sequenza; qualsiasi cosa con una "
"lunghezza diversa da zero è vera, le sequenze vuote sono false. Il test "
"utilizzato nell'esempio è un semplice confronto. Gli operatori di confronto "
"standard sono scritti come in C: ``<`` (minore di), ``>`` (maggiore di), "
"``==`` (uguale a), ``<=`` (minore o uguale a), ``>=`` (maggiore o uguale a) "
"e ``!=`` (diverso da)."
#: tutorial/introduction.rst:535
msgid ""
"The *body* of the loop is *indented*: indentation is Python's way of "
"grouping statements. At the interactive prompt, you have to type a tab or "
"space(s) for each indented line. In practice you will prepare more "
"complicated input for Python with a text editor; all decent text editors "
"have an auto-indent facility. When a compound statement is entered "
"interactively, it must be followed by a blank line to indicate completion "
"(since the parser cannot guess when you have typed the last line). Note "
"that each line within a basic block must be indented by the same amount."
msgstr ""
"Il *corpo* del ciclo è *indentato*: l'indentazione è il modo di Python di "
"raggruppare le istruzioni. Al prompt interattivo, è necessario digitare un "
"tab o spazio/i per ogni riga rientrata. In pratica si prepara un input più "
"complicato per Python con un editor di testo; tutti gli editor di testo seri "
"hanno una funzione di auto-indentazione. Quando un'istruzione composta è "
"inserita nella shell interattiva, deve essere seguita da una riga vuota per "
"indicare il completamento (poiché l'analizzatore non può indovinare quando "
"si è digitata l'ultima riga). Si noti che ogni riga all'interno di un "
"blocco di base deve essere rientrata della stessa quantità."
#: tutorial/introduction.rst:544
msgid ""
"The :func:`print` function writes the value of the argument(s) it is given. "
"It differs from just writing the expression you want to write (as we did "
"earlier in the calculator examples) in the way it handles multiple "
"arguments, floating point quantities, and strings. Strings are printed "
"without quotes, and a space is inserted between items, so you can format "
"things nicely, like this::"
msgstr ""
"La funzione :func:`print` scrive il valore dell'argomento o degli argomenti "
"che le vengono passati. Si differenzia dal solo scrivere l'espressione che "
"si vuole scrivere (come abbiamo fatto in precedenza negli esempi della "
"calcolatrice) per il modo in cui gestisce argomenti multipli, numeri in "
"virgola mobile e stringhe. Le stringhe vengono stampate senza virgolette e "
"viene inserito uno spazio tra gli elementi, in modo da poter formattare bene "
"le cose, in questo modo::"
#: tutorial/introduction.rst:555
msgid ""
"The keyword argument *end* can be used to avoid the newline after the "
"output, or end the output with a different string::"
msgstr ""
"L'argomento *end* può essere usato per evitare la nuova linea dopo l'output, "
"o terminare l'output con una stringa diversa::"
#: tutorial/introduction.rst:567
msgid "Footnotes"
msgstr "Note"
#: tutorial/introduction.rst:568
msgid ""
"Since ``**`` has higher precedence than ``-``, ``-3**2`` will be interpreted "
"as ``-(3**2)`` and thus result in ``-9``. To avoid this and get ``9``, you "
"can use ``(-3)**2``."
msgstr ""
"Poiché ``**`` ha una precedenza superiore a ``-``, ``-3**2`` sarà "
"interpretato come ``-(3**2)`` e quindi risulterà in ``-9``. Per evitare "
"questo e ottenere ``9``, è possibile utilizzare ``(-3)**2``."
#: tutorial/introduction.rst:572
msgid ""
"Unlike other languages, special characters such as ``\\n`` have the same "
"meaning with both single (``'...'``) and double (``\"...\"``) quotes. The "
"only difference between the two is that within single quotes you don't need "
"to escape ``\"`` (but you have to escape ``\\'``) and vice versa."
msgstr ""
"A differenza di altri linguaggi, i caratteri speciali come ``\\n`` hanno lo "
"stesso significato sia con apici singoli (``’…’``) che doppi (``”…”``). "
"L'unica differenza tra i due è che all'interno delle stringhe ad apici "
"singoli non c’è bisogno di aggiungere il carattere di escaping prima del "
"``\"`` (ma bisogna inserirlo prima di un ``\\'``) e viceversa."
#: tutorial/introduction.rst:21
msgid "# (hash)"
msgstr "# (hash)"
#: tutorial/introduction.rst:21
msgid "comment"
msgstr "commento"
#~ msgid "Strings"
#~ msgstr "Stringa"
#~ msgid ""
#~ "Besides numbers, Python can also manipulate strings, which can be "
#~ "expressed in several ways. They can be enclosed in single quotes "
#~ "(``'...'``) or double quotes (``\"...\"``) with the same result [#]_. "
#~ "``\\`` can be used to escape quotes::"
#~ msgstr ""
#~ "Oltre ai numeri, Python può anche manipolare le stringhe, che possono "
#~ "essere espresse in diversi modi. Possono essere racchiuse in citazioni "
#~ "singole (``'...'``) o doppie (``\"...\"``) con lo stesso risultato [#]_. "
#~ "``\\`` può essere usato per l’*escaping*::"
#~ msgid ""
#~ "In the interactive interpreter, the output string is enclosed in quotes "
#~ "and special characters are escaped with backslashes. While this might "
#~ "sometimes look different from the input (the enclosing quotes could "
#~ "change), the two strings are equivalent. The string is enclosed in "
#~ "double quotes if the string contains a single quote and no double quotes, "
#~ "otherwise it is enclosed in single quotes. The :func:`print` function "
#~ "produces a more readable output, by omitting the enclosing quotes and by "
#~ "printing escaped and special characters::"
#~ msgstr ""
#~ "Nell'interprete interattivo, la stringa di output è racchiusa tra "
#~ "virgolette e i caratteri speciali vengono preceduti con backslash. Anche "
#~ "se a volte può sembrare diverso dall'input (le virgolette allegate "
#~ "potrebbero cambiare), le due stringhe sono equivalenti. La stringa è "
#~ "racchiusa tra virgolette se la stringa contiene una singola citazione e "
#~ "non citazioni doppie, altrimenti è racchiusa tra virgolette singole. La "
#~ "funzione :func:`print` produce un output più leggibile, omettendo le "
#~ "citazioni allegate e stampando i caratteri speciali::"