binary.py 355 Bytes
Newer Older
Edel Philip's avatar
Edel Philip committed
1
class Binary(entree):
Edel Philip's avatar
a coder    
Edel Philip committed
2
"""une classe pour representer les nombres binaires """
Edel Philip's avatar
Edel Philip committed
3
    def __init__(self):
Edel Philip's avatar
mksdmlq    
Edel Philip committed
4
5
6
7
8
        if type(entree) is int:
            self.value = entree
        elif type(entree) is list:
            pass
        elif type(entree) is str:
Edel Philip's avatar
Edel Philip committed
9
10
11
            self.binary = entree
        else type(entree) is hex:
            self.value = int(entree)