jkstra |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
typed reference to an object.
I expect both of these requests to meet with little satisfaction.
--
\ “We are all agreed that your theory is crazy. The question that |
`\ divides us is whether it is crazy enough to have a chance of |
_o__)being correct.” —Niels Bohr (to Wolfga
v/peps/pep-0526/ is titled "Syntax for
Variable Annotations". It describes:
"This PEP aims at adding syntax to Python for annotating the types of
variables (including class variables and instance variables), instead
of expressing them through comments"
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
frameworks of many languages,
including Python's ‘logging’ module.
--
\ “When I turned two I was really anxious, because I'd doubled my |
`\ age in a year. I thought, if this keeps up, by the time I'm six |
_o__) I'll be ninety.” —Steven
and incorporated into law and policy.” |
_o__) —Russell Blackford, 2010-03-06 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
believe in it.” —Neil deGrasse Tyson, 2011-02-04 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
son & Sussman, |
_o__) _Structure and Interpretation of Computer Programs_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Pilgrim, 2006 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e might think that dumping out bytes in the correct order ought to
> be the default format for hexdump.
It is if you run it as hd.
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
ferences.” —David Weinberger |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
hat object.
> And
> L =[]
All the above description also applies to that assignment statement.
--
\“If you go parachuting, and your parachute doesn't open, and |
`\you friends are all watching you fall, I think a funny gag |
_o__) would be to
Ben Finney writes:
> Ajay Patel writes:
>
> > L = [1,2,3]
>
> That's not an expression; it is an assignment statement.
>
> The right-hand side is an expression. […] in this case, [the object] a new
> instance of 'list' […] is the result of evaluating t
whatever
optimisations the in-built comprehension mechanics provide.
--
\ “Pray, v. To ask that the laws of the universe be annulled in |
`\ behalf of a single petitioner confessedly unworthy.” —Ambrose |
_o__) Bierce, _The Devil's Dictionary_, 1906 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> You can use a comprehension, iterating over the full range of index you
> want::
>
> words = shlex.split(line)
> padding_length = 5
> words_padded = [
> (words[index] if index < len(words))
> for index in range(paddi
which prompted this instance.
--
\ “Truth would quickly cease to become stranger than fiction, |
`\ once we got as used to it.” —Henry L. Mencken |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ethan Furman writes:
> On 10/01/2018 04:26 PM, Ben Finney wrote:
> > If there is some specific formal meaning to the above statement, I
> > don't know where it's documented. If it's not a specific formal
> > statement, that is itself troubling, because it
its speaker a raving lunatic.” —Dresden James |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
“I find the whole business of religion profoundly interesting. |
`\ But it does mystify me that otherwise intelligent people take |
_o__) it seriously.” —Douglas Adams |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
received and am still receiving” —Albert Einstein |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ot of incorrect terminology.
But the material itself is so dull -- numbers, arithmetic, more numbers,
factorials, more arithmetic, numbers... And when a string exercise came
up (capitalise a word) the hint was to use ord and chr.
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
ing 60 MPH.” |
_o__) —Steven Wright |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ort | grep TYPE | cut -d= -f2"
Note that "TYPE" and "=" don't really need to be quoted at all.
Someone suggested sed, and that too can be used like this:
blkid %s -o export | sed -ne '/TYPE=/s///p'
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote:
>
>> Ben Bacarisse writes:
>>
>>> It's shame that anonymous functions (for that's what's being returned
>>> here -- a function with no name) were born of a
he code object is available on that
code object's '__doc__' attribute.
[…]
https://en.wikipedia.org/wiki/Docstring#Python>
--
\ “True greatness is measured by how much freedom you give to |
`\ others, not by how much you can coerce others to do what you |
to leave the driveway doing 60 MPH.” |
_o__) —Steven Wright |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Smith writes:
> Il 29/03/2016 11:17, Ben Finney ha scritto:
> > You'll get better help if you:
> >
> > * Summarise the problem briefly in the Subject field.
> >
> > * Actually say anything useful in the message body.
> >
> thanks a lot
You're
—Sam Harris, at _Beyond Belief 2006_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
.” —Jack Handey |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
procedure" but it maintained the distinction in that
functions had (have?) a type and subroutines didn't (don't). Algol 68
uses PROC for both and the type VOID for procedures with no value.
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
of your own existence is the most astonishing fact |
`\you'll ever have to confront. Don't dare ever see your life as |
_o__)boring, monotonous, or joyless.” —Richard Dawkins, 2010-03-10 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ined as
commands. Such as ‘list’.
--
\ “The trouble with Communism is the Communists, just as the |
`\ trouble with Christianity is the Christians.” —Henry L. Mencken |
_o__) |
Ben Finney
--
https://mail.python.org/m
ke it much easier to search for the documentation to
understand the problem.
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.stdout>
--
\ “When people believe that they have absolute knowledge, with no |
`\ test in reality, this [the Auschwitz crematorium] is how they
passionate position when you ask the
volunteers here for help next time.
--
\ “Education is learning what you didn't even know you didn't |
`\ know.” —Daniel J. Boorstin, historian, 1914–2004 |
_o__)
it at the expense of ten thousand desires makes a wise and |
_o__) happy purchase.” —J. Balguy |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
g forum
https://mail.python.org/mailman/listinfo/tutor>.
--
\“If one tells the truth, one is sure, sooner or later, to be |
`\ found out.” —Oscar Wilde, _Phrases and Philosophies for the Use |
_o__) of the Young_, 1894 |
Ben Finney
--
https:/
code to do, and what happens instead, and
how that is different from what you expect.
--
\ “I distrust those people who know so well what God wants them |
`\to do to their fellows, because it always coincides with their |
_o__) own desires.” —Susan Brownell Anthony,
rates the
behaviour confusing you.
--
\ “[Entrenched media corporations will] maintain the status quo, |
`\ or die trying. Either is better than actually WORKING for a |
_o__) living.” —ringsnake.livejournal.com, 2007-11-12 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Aaron Presley (1935–1977) |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e companies pay for being unoriginal.” |
`\—Yves Béhar, _New York Times_ interview 2010-12-30 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
guard even his |
`\ enemy from oppression.” —Thomas Paine |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Gates, 2004-01-24 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Antoon Pardon writes:
> Op 07-04-16 om 23:08 schreef Ben Finney:
> > You are essentially describing the new internal API of comparison
> > operators. That's pretty much unavoidable.
>
> And nobody thought about this kind of cases
I'm quite confident the API cha
.” —Emo Philips |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
om facts?” —Kathryn Schulz, 2015-10-19 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
implementations are suspect and likely can
be improved: at least parity should be possible, to the point of
statistical insignificance.
--
\“Perchance you who pronounce my sentence are in greater fear |
`\ than I who receive it.” —Giordano Bruno, burned at the stake by |
_o__
jk together, but they almost never appear
together in English text.
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
Ben Bacarisse writes:
> alister writes:
>
>>
>> the design of qwerty was not to "Slow" the typist bu to ensure that the
>> hammers for letters commonly used together are spaced widely apart,
>> reducing the portion of trier travel arc were the could
Rustom Mody writes:
> On Saturday, April 9, 2016 at 7:14:05 PM UTC+5:30, Ben Bacarisse wrote:
>> The problem with that theory is that 'er/re' (this is e and r in either
>> order) is the 3rd most common pair in English but have been placed
>> together. ou and et
, |
_o__) 1977 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
eads to boredom, boredom to horrifying mistakes, |
`\ horrifying mistakes to God-I-wish-I-was-still-bored, and it |
_o__) goes downhill from there.” —Will Larson, 2008-11-04 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e?
I hope that helps to distinguish the different matters that are
confusing you.
--
\“Last year I went fishing with Salvador Dali. He was using a |
`\ dotted line. He caught every other fish.” —Steven Wright |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
as long as |
`\ they're exactly like the old ones.” —Charles F. Kettering |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
nted a literal syntax to create a zero-length tuple. A pair of parens
is that literal syntax, and it's the parens that create the (empty)
tuple.
--
\ “It is hard to believe that a man is telling the truth when you |
`\ know that you would lie if you were in his place.” —Hen
d you, I am not saying that this is wrong. I'm just saying that
> it surprised me.
What behaviour did you expect instead? That's still unclear.
Can you show the fictional session that would result from the behaviour
you expect?
--
\ “Education is learning what you didn't even know you didn't |
`\ know.” —Daniel J. Boorstin, historian, 1914–2004 |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Mon, Apr 11, 2016 at 10:45 AM, Ben Finney
> wrote:
> > So the expanation that remains true when you examine it is: People
> > wanted a literal syntax to create a zero-length tuple. A pair of parens
> > is that literal syntax, and it'
Fillmore writes:
> On 04/10/2016 08:31 PM, Ben Finney wrote:
> > Can you describe explicitly what that “discontinuation point” is? I'm
> > not seeing it.
>
> Here you go:
>
> >>> a = '"string1"'
> >>> b = '"string
some point. Better IMO never to lay that trap.
--
\ “It’s a great idea to come in unencumbered by dogma but you |
`\can’t also be unencumbered by evidence.” —Darren Saunders, |
_o__) 2015-12-02 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Mon, 11 Apr 2016 11:41 am, Ben Finney wrote:
>
> > Chris Angelico writes:
> >
> >> Fair enough. Let's instead say "commas create tuples", which is true
> >> in all cases except the singleton empty tupl
Fillmore writes:
> On 04/10/2016 09:36 PM, Ben Finney wrote:
> > If the two examples give you different responses (one surprises you, the
> > other does not), I would really like to know*what the surprise is*.
> > What specifically did you expect, that did not happen?
>
&
c)
Isn't that just as surprising as the same expressions evaluated with
‘eval’?
If not, that's what is confusing me. I can't see how one would be
expected, but the other would be surprising.
--
\ “It is well to remember that the entire universe, with one |
`\ tri
“Don't be afraid of missing opportunities. Behind every failure |
`\ is an opportunity somebody wishes they had missed.” —Jane |
_o__) Wagner, via Lily Tomlin |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
hat it is |
`\inappropriate for religion to play any role in issues of state |
_o__)[of] a modern democracy.” —Lawrence M. Krauss, 2012-05-28 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
written for people to read, and only |
`\incidentally for machines to execute.” —Abelson & Sussman, |
_o__) _Structure and Interpretation of Computer Programs_ |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
"Martin A. Brown" writes:
> The only change from what Ben suggests is that, once I found os.EX_OK,
> I just kept on using it, instead of difining my own EXIT_SUCCESS in
> every program.
Ah, thank you! I was unaware of the exit-status constants in ‘os’::
The following exi
t they want and are |
`\ willing to go through hell to get it.” —Donald Robert Perry |
_o__) Marquis |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
trouble. It's the things we know that ain't so.” —Artemus Ward |
_o__) (1834–1867), U.S. journalist |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Dan Sommers writes:
> On Thu, 14 Apr 2016 13:25:14 +1000, Ben Finney wrote:
>
> > How can my Python program convert the user's keyboard input to upper
> > case, as though the user has CAPS LOCK enabled?
>
> I don't know which OS you're using, but if I run
nd they think “I know, I'll use |
`\ Perl!”. Now they have some number of problems but they're not |
_o__) sure whether it's a string or an integer.” —Benno Rice, 2011 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> Okay, ‘termios.tcgetattr’ will let me preserve the attributes, and
> with Dan Sommers's suggestion of which attribute to use, I may have a
> shot at setting the terminal attributes.
This works!
I can get the current attributes, and preserve them; then
at leads you to think it is available on your system?
--
\“Program testing can be a very effective way to show the |
`\presence of bugs, but is hopelessly inadequate for showing |
_o__) their absence.” —Edsger W. Dijkstra |
Ben Finney
--
ht
od about the language and its community.
--
\ “What we usually pray to God is not that His will be done, but |
`\ that He approve ours.” —Helga Bergold Gross |
_o__) |
Ben Finney
--
https://mail.python
der inheritance and how the ‘unittest’ API
supports it.
--
\ “Faith, n. Belief without evidence in what is told by one who |
`\ speaks without knowledge, of things without parallel.” —Ambrose |
_o__) Bierce, _The Devil's Dictionary_, 1906 |
Ben Finney
--
ed might expect
exact_sum([0.3, 0.7])
to be 1.
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
Oscar Benjamin writes:
> On 15 April 2016 at 11:10, Ben Bacarisse wrote:
>> Oscar Benjamin writes:
>>
>>> On 15 April 2016 at 10:24, Robin Becker wrote:
>>
>>>> yes indeed summation is hard :(
>>>
>>> Not with Fraction it isn
his own liberty secure must guard even his |
`\ enemy from oppression.” —Thomas Paine |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
expense of ten thousand desires makes a wise and |
_o__) happy purchase.” —J. Balguy |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
--
\ “Geeks like to think that they can ignore politics. You can |
`\leave politics alone, but politics won't leave you alone.” |
_o__) —Richard M. Stallman, 2002-07-26 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
chnology
of your terminal. It's about the technology of the brain reading the
text.
--
\“Fascism is capitalism plus murder.” —Upton Sinclair |
`\ |
_o__)
columns, but no other white space.
* Oh, come on, no-one would use U+000C FORM FEED in source code.
--
\ “The apparent lesson of the Inquisition is that insistence on |
`\ uniformity of belief is fatal to intellectual, moral, and |
_o__)spiritual health.” —_The Uses Of The Past_, Herbert J. Muller |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber writes:
> On Sat, 16 Apr 2016 16:56:10 +1000, Ben Finney
> declaimed the following:
>
> >It seems strange that even the constant for “no error” exit status
> >should be defined only for Unix :-/
>
> VMS had a whole slew of "no error&qu
available on Unix window managers and is still around.
I use it on even an up-to-date Linux/Gnome3 system (you set focus
follows mouse rather than focus on click).
--
Ben.
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Sun, Apr 17, 2016 at 9:25 AM, Ben Bacarisse wrote:
>> Dennis Lee Bieber writes:
>>
>>> I still miss the Amiga -- in which one could /push/ a window to the
>>> back of the stack while still retaining input focus! Made it nice
make the design as clear and simple and obviously correct as feasible.
--
\ “Welchen Teil von ‘Gestalt’ verstehen Sie nicht? [What part of |
`\ ‘gestalt’ don't you understand?]” —Karsten M. Self |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
sell, _Free |
_o__) Thought and Official Propaganda_, 1928 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
because they are ignored.” —Aldous |
`\Huxley |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> Ben Finney writes:
>
> > Okay, ‘termios.tcgetattr’ will let me preserve the attributes, and
> > with Dan Sommers's suggestion of which attribute to use, I may have
> > a shot at setting the terminal attributes.
>
> This works!
Except, it
ively easy and easily comparable.
--
\ “I think Western civilization is more enlightened precisely |
`\ because we have learned how to ignore our religious leaders.” |
_o__) —Bill Maher, 2003 |
Ben Finney
--
https://mail.python.org/ma
earn a living.” |
_o__) —Bertrand Russell, _Free Thought and Official Propaganda_, 1928 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
ver done |
`\for me?” —Groucho Marx |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
e world”. So your claim is false.
--
\ “I do not believe in immortality of the individual, and I |
`\consider ethics to be an exclusively human concern with no |
_o__) superhuman authority behind it.” —Albert Einstein, letter, 1953 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
an/listinfo/tutor> which is specially
focussed on helping Python beginners.
--
\ “Giving every man a vote has no more made men wise and free |
`\ than Christianity has made them good.” —Henry L. Mencken |
_o__)
it today. Sure |
`\ enough, I couldn't see any forests.” —Steven Wright |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
r that purpose
https://www.python.org/jobs/>.
--
\ “I don't care to belong to a club that accepts people like me |
`\as members.” —Groucho Marx |
_o__) |
Ben Finney
--
h
then please do that.
--
\ “I have one rule to live by: Don't make it worse.” —Hazel |
`\ Woodcock |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
od pro/con discussion of the use case you're trying
to address :-)
--
\“I'd take the awe of understanding over the awe of ignorance |
`\ any day.” —Douglas Adams |
_o__)
Twain, _Pudd'n'head Wilson_ |
_o__) |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
2010-01-12 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
’ described at that URL.
--
\ “To have the choice between proprietary software packages, is |
`\ being able to choose your master. Freedom means not having a |
_o__)master.” —Richard M. Stallman, 2007-05-16 |
Ben Finney
--
https://mail.python.org/mailman/listinfo/python-list
Stephen Hansen writes:
> On Wed, Apr 27, 2016, at 10:32 PM, Ben Finney wrote:
> > Better: when you have many semantically-different values, use named
> > (not positional) parameters in the format string. […]
> >
> > https://docs.python.org/3/library/string.html#fo
Stephen Hansen writes:
> On Wed, Apr 27, 2016, at 11:55 PM, Ben Finney wrote:
> > Everything I described above works fine in Python 2.
>
> This response is completely unhelpful.
I'll let the OP be the judge of that.
> The OP is using Python 2, and using %-formatting, and
901 - 1000 of 5100 matches
Mail list logo