Table of Contents Previous Next
Logo
Client-Side Slice-to-Python Mapping : 22.3 Mapping for Identifiers
Copyright © 2003-2010 ZeroC, Inc.

22.3 Mapping for Identifiers

Slice identifiers map to an identical Python identifier. For example, the Slice iden­tifier Clock becomes the Python identifier Clock. There is one exception to this rule: if a Slice identifier is the same as a Python keyword or is an identifier reserved by the Ice run time (such as checkedCast), the corresponding Python identifier is prefixed with an underscore. For example, the Slice identifier while is mapped as _while.1
The mapping does not modify a Slice identifier that matches the name of a Python built‑in function because it can always be accessed by its fully-qualified name. For example, the built‑in function hash can also be accessed as __builtin__.hash.

1
As suggested in Section 4.5.3 on page 92, you should try to avoid such identifiers as much as possible.


Table of Contents Previous Next
Logo