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
, int) is 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/
not
an issue, 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/
that
results are undefined when doing so; this will simply 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;
range(4)]
grid[i][i] = 4
Is this a good idea? Are there some subtleties I've failed 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/
math).tan(math.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/
>>> 56 @ "str1" #str would also have __rmatmul__
"56str1"
>>> content = "foobar"
>>> content @= "bazbang"
>>> content @= "running out of ideas"
>>> content
'foobarbazbangrunn
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: <20180614072902.
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 int
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
? As far as 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/
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
asyncio.get_event_
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/
visionError, 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
gs.
> But XORing bytes seems perfectly reasonable. Bytes are numbers, even if
we display them as ASCII characters.
My thought exactly.
On Thu, 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 ra
string:
>>> 'HELLO' ^ 'world'
'?*> +'
or bytestring:
>>> b'HELLO' ^ b'world'
b'?*> +'
(All of this applies to other bitwise operators, of course.)
Compatibility issues are a no-brainer - curre
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 ide
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: htt
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
charact
actually almost
equivalent to defining an 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
;
__
- i.e. "end", "file", and so on. IMO it should, as the
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/
d? Allowing the error to pass
through would almost certainly be unexpected behavior; attempting 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 exp
22 matches
Mail list logo