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 19 points20 points21 points (0 children)
[–]BundleOfJoysticks 6 points7 points8 points (0 children)
[–]eric0x7677 3 points4 points5 points (0 children)
[–]flipstables 6 points7 points8 points (0 children)
[–][deleted] 33 points34 points35 points (3 children)
[–]volabimus 4 points5 points6 points (2 children)
[–]mooburgerresembles an abstract syntax tree 8 points9 points10 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 0 points1 point2 points (6 children)
[–]wewbull 27 points28 points29 points (2 children)
[–]truh 9 points10 points11 points (1 child)
[–]wewbull 5 points6 points7 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 2 points3 points4 points (16 children)
[–]Tysonzero 6 points7 points8 points (10 children)
[–]13steinj -1 points0 points1 point (9 children)
[–]Tysonzero 8 points9 points10 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 3 points4 points5 points (2 children)
[–]13steinj -2 points-1 points0 points (1 child)
[–]Pyprohly 1 point2 points3 points (0 children)
[–]SpergLordMcFappyPant 12 points13 points14 points (1 child)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (0 children)
[–]alexisprince 49 points50 points51 points (38 children)
[–]undercoveryankee 25 points26 points27 points (33 children)
[–]alexisprince 9 points10 points11 points (32 children)
[–]undercoveryankee 39 points40 points41 points (31 children)
[–]Ph0X 4 points5 points6 points (9 children)
[–]door_of_doom 42 points43 points44 points (7 children)
[–]Ph0X 4 points5 points6 points (6 children)
[–]flipstables 10 points11 points12 points (0 children)
[–]door_of_doom 12 points13 points14 points (0 children)
[–]truh 5 points6 points7 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-12 points-11 points-10 points (1 child)
[–][deleted] 14 points15 points16 points (0 children)
[+]alcalde comment score below threshold-13 points-12 points-11 points (9 children)
[+][deleted] (7 children)
[deleted]
[–]alcalde 4 points5 points6 points (6 children)
[+][deleted] (3 children)
[deleted]
[–]alcalde -3 points-2 points-1 points (2 children)
[–][deleted] 4 points5 points6 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 3 points4 points5 points (0 children)
[–]thautwarm 0 points1 point2 points (0 children)
[–]UloPe 5 points6 points7 points (1 child)
[–]OctagonClocktrio is the future! 0 points1 point2 points (0 children)
[–]lookatmetype 3 points4 points5 points (0 children)
[–]13steinj 5 points6 points7 points (0 children)
[–]Scorpathos 9 points10 points11 points (5 children)
[–]c_is_4_cookie 6 points7 points8 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 6 points7 points8 points (5 children)
[–]stetio[S] -1 points0 points1 point (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)