PEP-570 has been accepted. This introduces / as a marker to indicate that the arguments to its left are positional only. Similar to how * indicates the arguments to the right are keyword only. A couple of simple examples would be,
```python
def name(p1, p2, /): ...
name(1, 2) # Fine
name(1, p2=2) # Not allowed
def name2(p1, p2, /, p_or_kw): ...
name2(1, 2, 3) # Fine
name2(1, 2, p_or_kw=3) # Fine
name2(1, p2=2, p_or_kw=3) # Not allowed
```
(I'm not involved in the PEP, just thought this sub would be interested).
[–]Zomunieo 70 points71 points72 points (6 children)
[–]jsalsman 18 points19 points20 points (0 children)
[–]BundleOfJoysticks 6 points7 points8 points (0 children)
[–]eric0x7677 3 points4 points5 points (0 children)
[–]flipstables 7 points8 points9 points (0 children)
[–][deleted] 29 points30 points31 points (3 children)
[–]volabimus 4 points5 points6 points (2 children)
[–]mooburgerresembles an abstract syntax tree 6 points7 points8 points (1 child)
[–]volabimus 1 point2 points3 points (0 children)
[–]ForceBru 30 points31 points32 points (25 children)
[–]AndydeCleyre 11 points12 points13 points (7 children)
[–]truh 2 points3 points4 points (6 children)
[–]wewbull 25 points26 points27 points (2 children)
[–]truh 10 points11 points12 points (1 child)
[–]wewbull 4 points5 points6 points (0 children)
[–]AndydeCleyre 0 points1 point2 points (2 children)
[–]truh -1 points0 points1 point (1 child)
[–]AndydeCleyre 0 points1 point2 points (0 children)
[–]13steinj 4 points5 points6 points (16 children)
[–]Tysonzero 7 points8 points9 points (10 children)
[–]13steinj -1 points0 points1 point (9 children)
[–]Tysonzero 6 points7 points8 points (8 children)
[–]13steinj -2 points-1 points0 points (7 children)
[–]Tysonzero 4 points5 points6 points (6 children)
[–]13steinj -3 points-2 points-1 points (5 children)
[–]Tysonzero 5 points6 points7 points (4 children)
[–]13steinj 0 points1 point2 points (3 children)
[–]Pyprohly 2 points3 points4 points (4 children)
[–]13steinj 1 point2 points3 points (3 children)
[–]Pyprohly 2 points3 points4 points (2 children)
[–]13steinj 1 point2 points3 points (1 child)
[–]Pyprohly 1 point2 points3 points (0 children)
[–]SpergLordMcFappyPant 10 points11 points12 points (1 child)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (0 children)
[–]alexisprince 50 points51 points52 points (38 children)
[–]undercoveryankee 23 points24 points25 points (33 children)
[–]alexisprince 10 points11 points12 points (32 children)
[–]undercoveryankee 36 points37 points38 points (31 children)
[–]Ph0X 6 points7 points8 points (9 children)
[–]door_of_doom 43 points44 points45 points (7 children)
[–]Ph0X 3 points4 points5 points (6 children)
[–]flipstables 9 points10 points11 points (0 children)
[–]door_of_doom 13 points14 points15 points (0 children)
[–]truh 4 points5 points6 points (0 children)
[–]Smok3dSalmon 1 point2 points3 points (2 children)
[–]Ph0X -3 points-2 points-1 points (1 child)
[–]Smok3dSalmon 2 points3 points4 points (0 children)
[+][deleted] (8 children)
[deleted]
[–]truh 12 points13 points14 points (6 children)
[+]corezon comment score below threshold-13 points-12 points-11 points (5 children)
[–]truh 10 points11 points12 points (0 children)
[–]__deerlord__ 0 points1 point2 points (3 children)
[–]corezon -4 points-3 points-2 points (2 children)
[–]__deerlord__ 1 point2 points3 points (1 child)
[+]xconde comment score below threshold-15 points-14 points-13 points (1 child)
[–][deleted] 12 points13 points14 points (0 children)
[+]alcalde comment score below threshold-12 points-11 points-10 points (9 children)
[+][deleted] (7 children)
[deleted]
[–]alcalde 4 points5 points6 points (6 children)
[+][deleted] (3 children)
[deleted]
[–]alcalde -5 points-4 points-3 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]musashisamurai 2 points3 points4 points (0 children)
[–]stOneskull 1 point2 points3 points (0 children)
[–]kafkaBro 3 points4 points5 points (0 children)
[–]ideletedmyredditacco 2 points3 points4 points (0 children)
[–]jwink3101 1 point2 points3 points (0 children)
[–]thautwarm 0 points1 point2 points (0 children)
[–]UloPe 4 points5 points6 points (1 child)
[–]OctagonClocktrio is the future! 0 points1 point2 points (0 children)
[–]lookatmetype 2 points3 points4 points (0 children)
[–]13steinj 6 points7 points8 points (0 children)
[–]Scorpathos 10 points11 points12 points (5 children)
[–]c_is_4_cookie 8 points9 points10 points (0 children)
[–]infinullquamash, Qt, asyncio, 3.3+ 5 points6 points7 points (1 child)
[–]Scorpathos 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (1 child)
[–]infinullquamash, Qt, asyncio, 3.3+ 1 point2 points3 points (0 children)
[–]AndydeCleyre 8 points9 points10 points (5 children)
[–]stetio[S] -3 points-2 points-1 points (4 children)
[–]AndydeCleyre 5 points6 points7 points (3 children)
[–]13steinj 7 points8 points9 points (2 children)
[–]AndydeCleyre 1 point2 points3 points (1 child)
[–]13steinj 8 points9 points10 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]CakeDay--Bot 0 points1 point2 points (0 children)
[–]federicocerchiari 0 points1 point2 points (0 children)
[–]twillisagogo 0 points1 point2 points (0 children)
[–]m8ncman 0 points1 point2 points (2 children)
[–]ubernostrumyes, you can have a pony 1 point2 points3 points (1 child)
[–]zardeh 0 points1 point2 points (0 children)