@@ -3079,7 +3079,7 @@ msgstr "as ações de \"armazenar\" também são listadas aqui."
30793079
30803080#: ../../library/optparse.rst:1967
30813081msgid "\" typed\" actions are additionally listed here."
3082- msgstr ""
3082+ msgstr "as ações \" typed \" também são listadas aqui. "
30833083
30843084#: ../../library/optparse.rst:1971
30853085msgid ""
@@ -3088,12 +3088,18 @@ msgid ""
30883088"assigns the default type, ``\" string\" ``, to options with no explicit type "
30893089"whose action is listed in :attr:`ALWAYS_TYPED_ACTIONS`."
30903090msgstr ""
3091+ "Ações que sempre assumem um tipo (ou seja, cujas opções sempre assumem um "
3092+ "valor) são listadas aqui adicionalmente. O único efeito disso é que :mod:"
3093+ "`optparse` atribui o tipo padrão, ``\" string\" ``, a opções sem tipo "
3094+ "explícito cuja ação é listada em :attr:`ALWAYS_TYPED_ACTIONS`."
30913095
30923096#: ../../library/optparse.rst:1976
30933097msgid ""
30943098"In order to actually implement your new action, you must override Option's :"
30953099"meth:`take_action` method and add a case that recognizes your action."
30963100msgstr ""
3101+ "Para realmente implementar sua nova ação, você deve substituir o método :"
3102+ "meth:`take_action` de Option e adicionar um caso que reconheça sua ação."
30973103
30983104#: ../../library/optparse.rst:1979
30993105msgid ""
@@ -3104,46 +3110,65 @@ msgid ""
31043110"existing list with them. That is, if ``--names`` is an ``\" extend\" `` "
31053111"option of type ``\" string\" ``, the command line ::"
31063112msgstr ""
3113+ "Por exemplo, vamos adicionar uma ação ``\" extend\" ``. Isso é semelhante à "
3114+ "ação padrão ``\" append\" ``, mas em vez de pegar um único valor da linha de "
3115+ "comando e anexá-lo a uma lista existente, ``\" extend\" `` pegará vários "
3116+ "valores em uma única string delimitada por vírgulas e estenderá uma lista "
3117+ "existente com eles. Ou seja, se ``--names`` for uma opção ``\" extend\" `` do "
3118+ "tipo ``\" string\" ``, a linha de comando ::"
31073119
31083120#: ../../library/optparse.rst:1988
31093121msgid "would result in a list ::"
3110- msgstr ""
3122+ msgstr "resultaria em uma lista :: "
31113123
31123124#: ../../library/optparse.rst:1992
31133125msgid "Again we define a subclass of Option::"
3114- msgstr ""
3126+ msgstr "Novamente, nós definimos uma subclasse de Option:: "
31153127
31163128#: ../../library/optparse.rst:2009
31173129msgid "Features of note:"
3118- msgstr ""
3130+ msgstr "Características de nota: "
31193131
31203132#: ../../library/optparse.rst:2011
31213133msgid ""
31223134"``\" extend\" `` both expects a value on the command-line and stores that "
31233135"value somewhere, so it goes in both :attr:`~Option.STORE_ACTIONS` and :attr:"
31243136"`~Option.TYPED_ACTIONS`."
31253137msgstr ""
3138+ "``\" extend\" `` espera um valor na linha de comando e armazena esse valor em "
3139+ "algum lugar, então ele vai em :attr:`~Option.STORE_ACTIONS` e :attr:`~Option."
3140+ "TYPED_ACTIONS`."
31263141
31273142#: ../../library/optparse.rst:2015
31283143msgid ""
31293144"to ensure that :mod:`optparse` assigns the default type of ``\" string\" `` to "
31303145"``\" extend\" `` actions, we put the ``\" extend\" `` action in :attr:`~Option."
31313146"ALWAYS_TYPED_ACTIONS` as well."
31323147msgstr ""
3148+ "para garantir que :mod:`optparse` atribua o tipo padrão de ``\" string\" `` às "
3149+ "ações ``\" extend\" ``, colocamos a ação ``\" extend\" `` em :attr:`~Option."
3150+ "ALWAYS_TYPED_ACTIONS` também."
31333151
31343152#: ../../library/optparse.rst:2019
31353153msgid ""
31363154":meth:`MyOption.take_action` implements just this one new action, and passes "
31373155"control back to :meth:`Option.take_action` for the standard :mod:`optparse` "
31383156"actions."
31393157msgstr ""
3158+ ":meth:`MyOption.take_action` implementa apenas esta nova ação e passa o "
3159+ "controle de volta para :meth:`Option.take_action` para as ações padrão :mod:"
3160+ "`optparse`."
31403161
31413162#: ../../library/optparse.rst:2023
31423163msgid ""
31433164"``values`` is an instance of the optparse_parser.Values class, which "
31443165"provides the very useful :meth:`ensure_value` method. :meth:`ensure_value` "
31453166"is essentially :func:`getattr` with a safety valve; it is called as ::"
31463167msgstr ""
3168+ "``values`` é uma instância da classe optparse_parser.Values, que fornece o "
3169+ "método muito útil :meth:`ensure_value`. :meth:`ensure_value` é "
3170+ "essencialmente :func:`getattr` com uma válvula de segurança; é chamado "
3171+ "como ::"
31473172
31483173#: ../../library/optparse.rst:2029
31493174msgid ""
0 commit comments