Menu

Item

Nicolas Hainaux
Attachments
dbg_item.png (2493 bytes)
memo_item.png (1794 bytes)

An Item is a single number (numeric Item) or string (literal Item).

It is used to represent calculus elements like : -3 ; +4.5 ; 296 ; 10³⁺⁸ ; (-8)²
and like : 'A' ; 'CD' ; 'x' ; 'b²' ; '-y³'
but not elements like : -5x², which should be represented by a Product of two Items (-5 and 'x²') or by a Monomial.

An Item embeds a Value.

It is an Exponented and its exponent is an Exponented itself, so it allows more complicated objects like 4^(x^2)

Possible args for __init__() :
None | Number | String | Item | (sign,value,exponent) | (sign,number|letter|Value) | 0-degree Monomial | Value

Fields :
value_inside : access to the Value embedded in the Item
raw_value : (read-only) access to value_inside.raw_value
is_out_striked : turn this boolean to True to have an out striked Item
force_display_sign_once : this boolean is used to force the display of a '+' sign in certain cases, but only once
unit : contains the unit of the Item (it should be merged with Value's unit field...)

Debugging info :

Check Item's complete doc

Back


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.