Skip to content

Conversation

@Otoru
Copy link
Contributor

@Otoru Otoru commented Oct 6, 2018

Explicação breve sobre o uso do recurso no python com alguns exemplos em código.

Copy link
Member

@luzfcb luzfcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tá muito bom. Só precisa corrigir esse pequeno erro de ortografia.

Dito isto, o inconveniente de usar operador ternário, é em relação ao teste de cobertura de código.
Usar operador ternário dificulta você ver se determinado caso foi testado dentro do ternário

Vemos claramente onde onde o bloco executado caso `vencer_o_thanos`
seja `True` começa e/ou termina graças a indentação. Quanto mais `if`s
você concatenar, mais bonito seu código fica e em momento algum o mesmo
se torna mais consfuso (ao menos, não deveria se tornar).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consfuso

@Otoru
Copy link
Contributor Author

Otoru commented Oct 6, 2018

Acredito ter deixado o texto mais claro agora.

Graças a indentação e ao espaçamento, vemos onde onde começa e/ou
termina o bloco executado caso a varável `vencer_o_thanos` seja
`True`. Quanto mais `if`'s você aninhar, mais bonito seu
código fica e em momento algum o mesmo se torna mais consfuso
Copy link
Member

@luzfcb luzfcb Oct 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Otoru Continua o erro na palavra "consfuso"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mybad.

@luzfcb luzfcb merged commit f5b85d3 into pythonclub:pelican Oct 6, 2018
@luzfcb
Copy link
Member

luzfcb commented Oct 6, 2018

@Otoru muito obrigado por sua contribuição. Dentro de alguns minutos já deve estar online

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants