def readfloat(self):
        n = ""
        while not self.eof() and (self.peek() in string.digits or self.peek() == "."):
            n += self.getc()
        # weird case where zero is ommited inthe last modifider, like in ',0.'
        if n == ".":
            return 0
        return float(n)
dataset/ETHPy150Open curtacircuitos/pcb-tools/gerber/am_read.py/Scanner.readfloat/original