Page 187 - Beginning Programming with Pyth - John Paul Mueller
P. 187

 FIGURE 9-2: A short string is successfully processed by the application.
FIGURE 9-3: Long strings are truncated to ensure that they remain a certain size.
This example adds length checking to your repertoire of application data error checks. Chapter 8 shows how to perform range checks, which ensure that a value meets specific limits. The length check is necessary to ensure that data, especially strings, aren’t going to overrun the size of data fields. In addition, a small input size makes it
     































































































   185   186   187   188   189