@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.12\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-01-17 14:51 +0000\n "
14
+ "POT-Creation-Date : 2025-02-03 18:16 +0000\n "
15
15
"PO-Revision-Date : 2024-05-11 00:32+0000\n "
16
16
"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2025\n "
17
17
"Language-Team : Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -59,6 +59,11 @@ msgid ""
59
59
"but :attr:`!__name__` are set to ``None``). The caller is responsible for "
60
60
"setting a :attr:`~module.__file__` attribute."
61
61
msgstr ""
62
+ "Retorna um novo objeto de módulo com :attr:`module.__name__` definido como "
63
+ "*name*. Os atributos :attr:`!__name__`, :attr:`~module.__doc__`, :attr:"
64
+ "`~module.__package__` e :attr:`~module.__loader__` do módulo são preenchidos "
65
+ "(todos, exceto :attr:`!__name__`, são definidos como ``None``). O chamador é "
66
+ "responsável por definir um atributo :attr:`~module.__file__`."
62
67
63
68
#: ../../c-api/module.rst:46 ../../c-api/module.rst:272
64
69
#: ../../c-api/module.rst:447
@@ -70,6 +75,8 @@ msgid ""
70
75
":attr:`~module.__package__` and :attr:`~module.__loader__` are now set to "
71
76
"``None``."
72
77
msgstr ""
78
+ ":attr:`~module.__package__` e :attr:`~module.__loader__` agora estão "
79
+ "definidos como ``None``."
73
80
74
81
#: ../../c-api/module.rst:57
75
82
msgid ""
@@ -107,6 +114,9 @@ msgid ""
107
114
"provide one, or if it is not a string, :exc:`SystemError` is raised and "
108
115
"``NULL`` is returned."
109
116
msgstr ""
117
+ "Retorna o valor :attr:`~module.__name__` do *module*. Se o módulo não "
118
+ "fornecer um, ou se não for uma string, :exc:`SystemError` é levantada e "
119
+ "``NULL`` é retornado."
110
120
111
121
#: ../../c-api/module.rst:90
112
122
msgid ""
@@ -141,6 +151,10 @@ msgid ""
141
151
"a string, raise :exc:`SystemError` and return ``NULL``; otherwise return a "
142
152
"reference to a Unicode object."
143
153
msgstr ""
154
+ "Retorna o nome do arquivo do qual o *module* foi carregado usando o "
155
+ "atributo :attr:`~module.__file__` do *module*. Se não estiver definido, ou "
156
+ "se não for uma string unicode, levanta :exc:`SystemError` e retorna "
157
+ "``NULL``; Caso contrário, retorna uma referência a um objeto Unicode."
144
158
145
159
#: ../../c-api/module.rst:122
146
160
msgid ""
@@ -644,17 +658,11 @@ msgid ""
644
658
"On success, return ``0``. On error, raise an exception and return ``-1``."
645
659
msgstr ""
646
660
647
- #: ../../c-api/module.rst:499
648
- msgid ""
649
- "Return ``-1`` if *value* is ``NULL``. It must be called with an exception "
650
- "raised in this case."
651
- msgstr ""
652
-
653
- #: ../../c-api/module.rst:502 ../../c-api/module.rst:559
661
+ #: ../../c-api/module.rst:499 ../../c-api/module.rst:560
654
662
msgid "Example usage::"
655
663
msgstr "Exemplo de uso::"
656
664
657
- #: ../../c-api/module.rst:504
665
+ #: ../../c-api/module.rst:501
658
666
msgid ""
659
667
"static int\n"
660
668
"add_spam(PyObject *module, int value)\n"
@@ -669,15 +677,22 @@ msgid ""
669
677
" }"
670
678
msgstr ""
671
679
672
- #: ../../c-api/module.rst:516 ../../c-api/module.rst:577
680
+ #: ../../c-api/module.rst:513
681
+ msgid ""
682
+ "To be convenient, the function accepts ``NULL`` *value* with an exception "
683
+ "set. In this case, return ``-1`` and just leave the raised exception "
684
+ "unchanged."
685
+ msgstr ""
686
+
687
+ #: ../../c-api/module.rst:517 ../../c-api/module.rst:578
673
688
msgid ""
674
689
"The example can also be written without checking explicitly if *obj* is "
675
690
"``NULL``::"
676
691
msgstr ""
677
692
"O exemplo também pode ser escrito sem verificar explicitamente se *obj* é "
678
693
"``NULL``::"
679
694
680
- #: ../../c-api/module.rst:519
695
+ #: ../../c-api/module.rst:520
681
696
msgid ""
682
697
"static int\n"
683
698
"add_spam(PyObject *module, int value)\n"
@@ -689,13 +704,13 @@ msgid ""
689
704
" }"
690
705
msgstr ""
691
706
692
- #: ../../c-api/module.rst:528 ../../c-api/module.rst:593
707
+ #: ../../c-api/module.rst:529 ../../c-api/module.rst:594
693
708
msgid ""
694
709
"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this "
695
710
"case, since *obj* can be ``NULL``."
696
711
msgstr ""
697
712
698
- #: ../../c-api/module.rst:531
713
+ #: ../../c-api/module.rst:532
699
714
msgid ""
700
715
"The number of different *name* strings passed to this function should be "
701
716
"kept small, usually by only using statically allocated strings as *name*. "
@@ -705,32 +720,32 @@ msgid ""
705
720
"internally to create a key object."
706
721
msgstr ""
707
722
708
- #: ../../c-api/module.rst:544
723
+ #: ../../c-api/module.rst:545
709
724
msgid ""
710
725
"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to "
711
726
"*value* on success (if it returns ``0``)."
712
727
msgstr ""
713
728
714
- #: ../../c-api/module.rst:547
729
+ #: ../../c-api/module.rst:548
715
730
msgid ""
716
731
"The new :c:func:`PyModule_AddObjectRef` function is recommended, since it is "
717
732
"easy to introduce reference leaks by misusing the :c:func:"
718
733
"`PyModule_AddObject` function."
719
734
msgstr ""
720
735
721
- #: ../../c-api/module.rst:553
736
+ #: ../../c-api/module.rst:554
722
737
msgid ""
723
738
"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
724
739
"releases the reference to *value* **on success**."
725
740
msgstr ""
726
741
727
- #: ../../c-api/module.rst:556
742
+ #: ../../c-api/module.rst:557
728
743
msgid ""
729
744
"This means that its return value must be checked, and calling code must :c:"
730
745
"func:`Py_DECREF` *value* manually on error."
731
746
msgstr ""
732
747
733
- #: ../../c-api/module.rst:561
748
+ #: ../../c-api/module.rst:562
734
749
msgid ""
735
750
"static int\n"
736
751
"add_spam(PyObject *module, int value)\n"
@@ -749,7 +764,7 @@ msgid ""
749
764
"}"
750
765
msgstr ""
751
766
752
- #: ../../c-api/module.rst:580
767
+ #: ../../c-api/module.rst:581
753
768
msgid ""
754
769
"static int\n"
755
770
"add_spam(PyObject *module, int value)\n"
@@ -765,73 +780,73 @@ msgid ""
765
780
"}"
766
781
msgstr ""
767
782
768
- #: ../../c-api/module.rst:599
783
+ #: ../../c-api/module.rst:600
769
784
msgid ""
770
785
"Add an integer constant to *module* as *name*. This convenience function "
771
786
"can be used from the module's initialization function. Return ``-1`` with an "
772
787
"exception set on error, ``0`` on success."
773
788
msgstr ""
774
789
775
- #: ../../c-api/module.rst:603
790
+ #: ../../c-api/module.rst:604
776
791
msgid ""
777
792
"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:"
778
793
"func:`PyModule_AddObjectRef`; see their documentation for details."
779
794
msgstr ""
780
795
781
- #: ../../c-api/module.rst:609
796
+ #: ../../c-api/module.rst:610
782
797
msgid ""
783
798
"Add a string constant to *module* as *name*. This convenience function can "
784
799
"be used from the module's initialization function. The string *value* must "
785
800
"be ``NULL``-terminated. Return ``-1`` with an exception set on error, ``0`` "
786
801
"on success."
787
802
msgstr ""
788
803
789
- #: ../../c-api/module.rst:614
804
+ #: ../../c-api/module.rst:615
790
805
msgid ""
791
806
"This is a convenience function that calls :c:func:"
792
807
"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their "
793
808
"documentation for details."
794
809
msgstr ""
795
810
796
- #: ../../c-api/module.rst:621
811
+ #: ../../c-api/module.rst:622
797
812
msgid ""
798
813
"Add an int constant to *module*. The name and the value are taken from "
799
814
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
800
815
"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` "
801
816
"with an exception set on error, ``0`` on success."
802
817
msgstr ""
803
818
804
- #: ../../c-api/module.rst:629
819
+ #: ../../c-api/module.rst:630
805
820
msgid "Add a string constant to *module*."
806
821
msgstr ""
807
822
808
- #: ../../c-api/module.rst:633
823
+ #: ../../c-api/module.rst:634
809
824
msgid ""
810
825
"Add a type object to *module*. The type object is finalized by calling "
811
826
"internally :c:func:`PyType_Ready`. The name of the type object is taken from "
812
827
"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return "
813
828
"``-1`` with an exception set on error, ``0`` on success."
814
829
msgstr ""
815
830
816
- #: ../../c-api/module.rst:643
831
+ #: ../../c-api/module.rst:644
817
832
msgid "Module lookup"
818
833
msgstr "Pesquisa por módulos"
819
834
820
- #: ../../c-api/module.rst:645
835
+ #: ../../c-api/module.rst:646
821
836
msgid ""
822
837
"Single-phase initialization creates singleton modules that can be looked up "
823
838
"in the context of the current interpreter. This allows the module object to "
824
839
"be retrieved later with only a reference to the module definition."
825
840
msgstr ""
826
841
827
- #: ../../c-api/module.rst:649
842
+ #: ../../c-api/module.rst:650
828
843
msgid ""
829
844
"These functions will not work on modules created using multi-phase "
830
845
"initialization, since multiple such modules can be created from a single "
831
846
"definition."
832
847
msgstr ""
833
848
834
- #: ../../c-api/module.rst:654
849
+ #: ../../c-api/module.rst:655
835
850
msgid ""
836
851
"Returns the module object that was created from *def* for the current "
837
852
"interpreter. This method requires that the module object has been attached "
@@ -840,18 +855,18 @@ msgid ""
840
855
"to the interpreter state yet, it returns ``NULL``."
841
856
msgstr ""
842
857
843
- #: ../../c-api/module.rst:661
858
+ #: ../../c-api/module.rst:662
844
859
msgid ""
845
860
"Attaches the module object passed to the function to the interpreter state. "
846
861
"This allows the module object to be accessible via :c:func:"
847
862
"`PyState_FindModule`."
848
863
msgstr ""
849
864
850
- #: ../../c-api/module.rst:664
865
+ #: ../../c-api/module.rst:665
851
866
msgid "Only effective on modules created using single-phase initialization."
852
867
msgstr ""
853
868
854
- #: ../../c-api/module.rst:666
869
+ #: ../../c-api/module.rst:667
855
870
msgid ""
856
871
"Python calls ``PyState_AddModule`` automatically after importing a module, "
857
872
"so it is unnecessary (but harmless) to call it from module initialization "
@@ -862,17 +877,17 @@ msgid ""
862
877
"state updates)."
863
878
msgstr ""
864
879
865
- #: ../../c-api/module.rst:674 ../../c-api/module.rst:685
880
+ #: ../../c-api/module.rst:675 ../../c-api/module.rst:686
866
881
msgid "The caller must hold the GIL."
867
882
msgstr ""
868
883
869
- #: ../../c-api/module.rst:676
884
+ #: ../../c-api/module.rst:677
870
885
msgid "Return ``-1`` with an exception set on error, ``0`` on success."
871
886
msgstr ""
872
887
"Retorna ``-1`` com uma exceção definida em caso de erro, ``0`` em caso de "
873
888
"sucesso."
874
889
875
- #: ../../c-api/module.rst:682
890
+ #: ../../c-api/module.rst:683
876
891
msgid ""
877
892
"Removes the module object created from *def* from the interpreter state. "
878
893
"Return ``-1`` with an exception set on error, ``0`` on success."
0 commit comments