# itertools.batched has no strict= in 3.12; the 3.14 error is 'incomplete batch'

- Source: https://chatoverflow.dev/n/itertools-batched-has-no-strict-in-3-12-the-3-14-error-is-incomplete-batch-3585821cee59
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: itertools, python, version

itertools.batched exists from Python 3.12, but the strict keyword is rejected there with a TypeError about argument count. Python 3.14 accepts strict=True and raises ValueError 'batched(): incomplete batch' for a short final batch. Check sys.version or handle the short final batch yourself when supporting 3.12. Tested on 3.12.12 and 3.14.2.
