Skip to content

SizeTList

Canonical path: NemAll_Python_Utility.SizeTList

Methods:

  • __contains__ –

    Check for a value in the list

  • __delitem__ –

    Delete a list item

  • __eq__ –

    Compare two list

  • __getitem__ –

    Get a list item

  • __init__ –

    Initialize

  • __iter__ –

    List iterator

  • __len__ –

    Get the list length

  • __repr__ –

    Convert the list to a string

  • __setitem__ –

    Set a list item

  • append –

    Append a list item

  • count –

    Get the values in the list

  • extend –

    Add the items from an iterable to the end of the list

  • index –

    Get the index for the value

  • insert –

    Insert an item in the list

  • pop –

    Overloaded function. See individual overloads.

  • remove –

    Remove a value from the list

  • reverse –

    Reverse the list

  • sort –

    Overloaded function. See individual overloads.

__contains__

__contains__(value: int) -> bool

Check for a value in the list

Parameters:

  • value (int) –

    Value to check

Returns:

  • bool –

    State for value is in the list

__delitem__

__delitem__(value: int)

Delete a list item

Parameters:

  • value (int) –

    Value to delete

__eq__

__eq__(compare_list: SizeTList) -> bool

Compare two list

Parameters:

  • compare_list (SizeTList) –

    List to compare

Returns:

  • bool –

    Lists are equal state

__getitem__

__getitem__(index: int) -> int

Get a list item

Parameters:

  • index (int) –

    Index of the item

Returns:

  • int –

    Value for the index

__init__

__init__()

Initialize

__iter__

__iter__() -> Iterator

List iterator

Returns:

  • Iterator –

    List iterator

__len__

__len__() -> int

Get the list length

Returns:

  • int –

    Length of the list

__repr__

__repr__() -> str

Convert the list to a string

Returns:

  • str –

    List values as string

__setitem__

__setitem__(index: int | slice, value: int)

Set a list item

Parameters:

  • index (int | slice) –

    Index of the item

  • value (int) –

    Value to item

append

append(value: int)

Append a list item

Parameters:

  • value (int) –

    Value to append

count

count(value: int) -> int

Get the values in the list

Parameters:

  • value (int) –

    Value to count

Returns: Value count

extend

extend(iterable: SizeTList)

Add the items from an iterable to the end of the list

Parameters:

index

index(value: int) -> int

Get the index for the value

Parameters:

  • value (int) –

    Value to find

Returns:

  • int –

    Index for the value

insert

insert(index: int, item: int)

Insert an item in the list

Parameters:

  • index (int) –

    Index of the item

  • item (int) –

    Value to insert

pop overloaded

pop() -> int

Pop the last value from the list

Returns:

  • int –

    Last value from the list

pop(index: int) -> int

Pop an item from the list

Parameters:

  • index (int) –

    Index of the item

Returns:

  • int –

    Value of the item

remove

remove(value: int)

Remove a value from the list

Parameters:

  • value (int) –

    Value to remove

reverse

reverse()

Reverse the list

sort overloaded

sort()

Sort the list

sort(cmp: object)

EXPERIMENTAL!

Placeholder