Hi,
As a workaround/alternative, you can just do
>>> import os
>>> os.system('dir')
Sincerely,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Cod
True
I know this is a crazy idea, but I thought it could have some merit, so why
not throw it out here?
Sharing,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ue, though, since Python is not PHP.
Anyway, I fully support this idea.
Sincerely,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
mply make it more obvious
that suspending execution in a with block is not meant to happen, and
convert undefined behavior into a straight-up SyntaxError.
What are your thoughts?
Sharing,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
ht
to explain?
Please let me know.
Sharing,
Ken Hilton
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
radians(45)) #math.radians is valid
because (import math) binds "math" to the current scope
What are your thoughts?
Sharing,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
tr would also have __rmatmul__
"56str1"
>>> content = "foobar"
>>> content @= "bazbang"
>>> content @= "running out of ideas"
>>> content
'foobarbazbangrunning out of ideas'
However, the operator does
Just changing the subject line here, to keep things on topic
Sincerely,
Ken;
-- Forwarded message -
Date: Thu, 14 Jun 2018 17:29:03 +1000
From: Steven D'Aprano
To: python-ideas@python.org
Subject: Re: [Python-ideas] Give regex operations more sugar
Message-ID:
Hi all,
Regexes are really useful in many places, and to me it's sad to see the
builtin "re" module having to resort to requiring a source string as an
argument. It would be much more elegant to simply do "s.search(pattern)"
than "re.search(pattern, s)".
I suggest building all regex operations
caught(exc)
finally:
if always is not None:
always()
Perhaps you could make use of this?
Suggesting,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of
s I know,
"async def" is a shorthand for
@asyncio.coroutine
def
and "await" is short for "yield from".
Sincerely,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/p
Hi all,
Just a simple idea I wanted to bring forth. Although I know that you get a
lot more asyncio control by importing the asyncio module itself, I'd like
to see a way to make simple asynchronous applications without ever
importing asyncio itself. To that end, I propose making
dea.
Thinking,
Ken Hilton;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
Error, lambda: 0/1)
0.0
>>> import asyncio as await #this is already currently legal, but will
not be in the __future__
>>> async def async(def):
... return await await.get_event_loop().run_in_executor(None, def)
...
>>>
And so on.
What are your thoughts?
Sharing,
hu, 17 May 2018 22:20:43 +1000, Steven D'Aprano wrote:
> What if the strings are unequal lengths?
(out-of-order quote lol)
Then the operators would raise a ValueError. (Assuming bytestrings, since
again, I'm dropping text strings.)
Sharing ideas
,
Ken
Hilton
;
_
>>> b'HELLO' ^ b'world'
b'?*> +'
(All of this applies to other bitwise operators, of course.)
Compatibility issues are a no-brainer - currently, bitwise operators for
strings raise TypeErrors.
Thanks.
Suggesting,
Ken
Hilton
;
___
Hi all,
I've been following the discussion of assignment expressions and what the
syntax for them should be for awhile. The ones that seem to crop up most
are the original spelling, :=, the "as" keyword (and variants including
it), and the recently "local" pseudo-function idea.
I have another
Whoops! Never seen that before. Nothing I searched up pointed me to it.
Sorry for wasting your time!
Ken;
--
Sincerely,
Ken;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct:
Hi all,
So I'm pretty sure everyone here is familiar with how the "bytes" object
works in Python 3. It acts mostly like a string, with the exception that
0-dimensional subscripting (var[idx]) returns an integer, not a bytes
object - the integer being the ordinal number of the corresponding
n anonymous function and executing it immediately,
i.e. this:
(lambda x=5: x*x)()
would be equivalent to this:
local (x=5) {
return x * x
}
both evaluating to 25.
Just some random thoughts!
Sincerely,
Ken
Hilton
;
___
Python-ide
only difference is that "dprint" returns its first argument while "print"
returns None.
But what are your thoughts?
Sincerely,
Ken
Hilton
;
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ting to use a
parent class's __str__ method would take more time and more processing
power (though it would eventually reach "object"'s __str__ method and
succeed). Therefore, non-string expression values should raise TypeError.
What are your thoughts?
Regards
,
Ken
Hilton
;
_
22 matches
Mail list logo