Skip to content

Commit

Permalink
1.19 - Implementação e assert
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuxbaum committed Apr 3, 2021
1 parent 019710b commit b00d733
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 1_introducao/19_this_self.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Nesta implementação em Java, o objetivo é ilustrar o uso do objeto 'this'. Em
Python, o objeto equivalente é 'self'.
"""


class Conta:
def __init__(self, saldo):
self.saldo = saldo


if __name__ == "__main__":

conta_teste = Conta(123.45)

assert conta_teste.saldo == 123.45

0 comments on commit b00d733

Please sign in to comment.