1 // indexing_example_example.pycmd
3 // Copyright (c) 2009 - Michele De Stefano (micdestefano@users.sourceforge.net)
5 // Distributed under the MIT License (See accompanying file LICENSE)
9 * \example indexing_example.pycmd
11 * Shows the usage of the indexing_example extension from the Python prompt.
14 mds_utils::python::support_random_access usage example from the Python prompt:
17 >>> from indexing_example import *
18 >>> dc = Dummy_Container()
20 [1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1]
26 [1.1, 3.1, 5.1, 7.1, 9.1]
28 [9.1, 8.1, 7.1, 6.1, 5.1, 4.1, 3.1, 2.1, 1.1]
33 [1.1, 2.1, 111.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1]
36 [1.1, 2.1, 111.1, 4.1, 5.1, 6.1, 333.3, 8.1, 9.1]
37 >>> dc[1::2] = [199.9,299.9,399.9,499.9]
39 [1.1, 199.9, 111.1, 299.9, 5.1, 399.9, 333.3, 499.9, 9.1]