# extractPythonControlFlow

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/parsers/backend/python-control-flow.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/parsers/backend/python-control-flow.ts#L460)

Read the guards and the failure handling out of a slice of Python source.

`startLine`/`endLine` are 1-based and inclusive, and default to the whole file — a parser passes
the span of the class or the handler it is describing, and everything reported is inside it.

## Signature

```ts
function extractPythonControlFlow(source: string, startLine: number, endLine: number): ControlFlow
```

## Parameters

| Name | Type |
|---|---|
| `source` | `string` |
| `startLine` | `number` |
| `endLine` | `number` |

**Returns:** `ControlFlow`
