EndfFloat

class endf_parserpy.EndfFloat(value, orig_str)[source]

float that keeps track of string representation.

Instances of this class represent float numbers. Additionally, each instance stores a string that should be the source string from which the float value was obtained.

Numeric comparisons between EndfFloat instances and data types convertible to float numbers via the float() function are possible. However, using EndfFloat instances directly in arithmetic expressions is not possible. They must be explicitly converted to an integer or float number before via float() or int() function, respectively.

Creation of EndfFloat instance.

Parameters:
  • value (object) – Any object that can be converted to a float via float(value).

  • orig_str – A string representation that corresponds to the float number given as value argument.

get_original_string()[source]

Return the string representation of the float value.