Name

set_location

Synopsis

                        b.set_location(key)

Sets b’s current record to the item with string key key, and returns a pair ( key,value ). If key is not a key in b, and b is of type BTree, b .set_location( key ) sets b’s current record to the item whose key is the smallest key larger than key and returns that key/value pair. For other object types, set_location raises KeyError if key is not a key in b.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.