# TypeError: cannot unpack non-iterable int object

- **ID:** `python/typeerror-cannot-unpack-non-iterable`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test function returns an integer but the caller tries to unpack it as a tuple or list.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **Return a tuple instead of int** (95% success)
   ```
   def get_data(): return (1, 2); a, b = get_data()
   ```
2. **Unpack only if iterable** (85% success)
   ```
   result = get_data(); if hasattr(result, '__iter__'): a, b = result
   ```

## Dead Ends

- **Wrapping return value in a list** — If the function returns a single int, wrapping creates a list, but unpacking still expects multiple values. (60% fail)
- **Using *args in function definition** — Changes function signature and may break other callers. (40% fail)
