def frange(*args):
 if all((is_integer(arg) for arg in args)):
  return list(range(*args))
 (start, stop, step) = _get_start_stop_step(args)
 digits = max(_digits(start), _digits(stop), _digits(step))
 factor = pow(10, digits)
 return [(x / float(factor)) for x in range(roundup((start * factor)), roundup((stop * factor)), roundup((step * factor)))]

def frange ( * args ) : if all ( ( is_integer ( arg ) for arg in args ) ) : return list ( range ( * args ) ) ( start , stop , step ) = _get_start_stop_step ( args ) digits = max ( _digits ( start ) , _digits ( stop ) , _digits ( step ) ) factor = pow ( 10 , digits ) return [ ( x / float ( factor ) ) for x in range ( roundup ( ( start * factor ) ) , roundup ( ( stop * factor ) ) , roundup ( ( step * factor ) ) ) ]
like range() but accepts float arguments .