Determine if the input source ends in a blank. A blank is either a newline or a line consisting of whitespace. Parameters ---------- src : string A single or multiline string.
(src)
| 203 | |
| 204 | |
| 205 | def last_blank(src): |
| 206 | """Determine if the input source ends in a blank. |
| 207 | |
| 208 | A blank is either a newline or a line consisting of whitespace. |
| 209 | |
| 210 | Parameters |
| 211 | ---------- |
| 212 | src : string |
| 213 | A single or multiline string. |
| 214 | """ |
| 215 | if not src: return False |
| 216 | ll = src.splitlines()[-1] |
| 217 | return (ll == '') or ll.isspace() |
| 218 | |
| 219 | |
| 220 | last_two_blanks_re = re.compile(r'\n\s*\n\s*$', re.MULTILINE) |
nothing calls this directly
no outgoing calls
no test coverage detected