On Mon, Jun 24, 2019 at 2:44 PM Andrew Barnert via Python-ideas
wrote:
> But dict displays, that could be confusing. Do you have to pass-value the
> key, or the value, or either of the two, or both consistently? If the key,
> does that short-circuit the value expression? So I think you’re
On Jun 23, 2019, at 19:57, MRAB wrote:
>
>> On 2019-06-24 02:43, Andrew Barnert wrote:
>> On Jun 23, 2019, at 13:33, MRAB wrote:
>>
>> > Finally, under "For consideration: alternative syntaxes", my offering
>> > would be:
>> > > expr if condition1 and not condition2 else pass
>>
>> This
On 2019-06-24 02:43, Andrew Barnert wrote:
On Jun 23, 2019, at 13:33, MRAB wrote:
> Finally, under "For consideration: alternative syntaxes", my offering would
be:
>
> expr if condition1 and not condition2 else pass
This seems a lot more tenable than the original proposal. The “unless”
On Jun 23, 2019, at 17:01, Steven D'Aprano wrote:
>
>> On Sun, Jun 23, 2019 at 03:22:37PM -0400, James Lu wrote:
>> Make $ a valid identifier and a singleton.
>>
>> $ is a useful placeholder in [].
>>
>> Possible function partial syntax:
>>
>> def foo(x, y):
>>print(x, y)
>>
>>
On Sat, Jun 22, 2019 at 12:14:02PM -0400, James Lu wrote:
> If a function that tends to return a context manager returns None,
> that should not mean an error occurred.
I suppose that *technically* this is true. It might be designed to
return a context manager or None. But:
1. Because of the
On Sun, Jun 23, 2019 at 03:22:37PM -0400, James Lu wrote:
> Make $ a valid identifier and a singleton.
>
> $ is a useful placeholder in [].
>
> Possible function partial syntax:
>
> def foo(x, y):
> print(x, y)
>
> partialized = foo[$, 10]
I don't think that creating partial functions is
I used "..." in my lib to do that :
from funcoperators import bracket
@bracket
def foo(x, y):
print(x, y)
partialized = foo[..., 10]
partialized(5)
https://pypi.org/project/funcoperators/
Le dim. 23 juin 2019 à 21:34, James Lu a écrit :
>
> Make $ a valid identifier and a singleton.
>
>
>
Make $ a valid identifier and a singleton.
$ is a useful placeholder in [].
Possible function partial syntax:
def foo(x, y):
print(x, y)
partialized = foo[$, 10]
partialized(5)
# => 5 10
___
Python-ideas mailing list -- python-ideas@python.org
On Mon, Jun 24, 2019 at 4:03 AM James Lu wrote:
>
> If a function that tends to return a context manager returns None, that
> should not mean an error occurred. If an error or unexpected condition
> occurred, an exception should be thrown. Errors and exceptions should result
> in the code
If a function that tends to return a context manager returns None, that should
not mean an error occurred. If an error or unexpected condition occurred, an
exception should be thrown. Errors and exceptions should result in the code
within the with statement not executing.
We could add a new
10 matches
Mail list logo