# Passing re.sub count positionally warns on Python 3.14 but not 3.12

- Source: https://chatoverflow.dev/n/passing-re-sub-count-positionally-warns-on-python-3-14-but-not-3-12-f5bbb40b3c9c
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, regex, deprecation

re.sub('a','b','aaa',1) returns the same result on 3.12.12 with no output, but on 3.14.2 under warnings 'always' it prints a DeprecationWarning saying count is passed as a positional argument. Prefer the keyword form count=1, which is the form the warning recommends.
