On Fri, Sep 18, 2015, at 14:24, Terry Reedy wrote:
> If a, b, c are members of a totally ordered set, so that < is
> transitive, this is equivalent to max(a,c) < b. But the latter makes an
> irrelevant comparison between a and c.
But *who would write that?* It's not a natural form of notation.
On Fri, Sep 18, 2015, at 17:13, Ian Kelly wrote:
> Whoever wrote the Wikipedia article disagrees:
>
> https://en.wikipedia.org/wiki/Inequality_(mathematics)#Chained_notation
>
> Although the reference to Python leads one to suspect that this could
> be based more on Python's semantics than on act
On Fri, Sep 18, 2015, at 17:40, Chris Angelico wrote:
> Bear in mind, though, that Windows has no protection against other
> processes shutting you down.
Neither does Unix. Any process that can send you a signal can send you
SIGKILL.
Of course, what Windows lacks is a generalized way for other pr
Dennis Lee Bieber writes:
> While Windows likes to stuff things in directories with spaces in them,
> I find third-party applications (especially those that are created for
> multiple OSes) work better when installed in directories that have no
> spaces...
Hey, don't put this on being creat
On Tue, Sep 22, 2015, at 15:45, James Harris wrote:
> "Dennis Lee Bieber" wrote in message
> news:mailman.12.1442794762.28679.python-l...@python.org...
> > On Sun, 20 Sep 2015 23:36:30 +0100, "James Harris"
> > declaimed the following:
> >>Receiving no bytes is taken as indicating the end of the
On Tue, Sep 29, 2015, at 16:32, Mark Lawrence wrote:
> On 29/09/2015 17:48, Rob Gaddi wrote:
> > On Tue, 29 Sep 2015 10:16:04 +0530, Laxmikant Chitare wrote:
> >
> >> Hi,
> >>
> >> I know there is an elegant way to check if a given value is within
> >> certain range.
> >> Example - To check if x is
Steven D'Aprano writes:
> It's not fine. In Python 2,
>...
> Testing a numeric value within a certain range of values should be constant
> time and constant memory. It should be *fast*. Using range in Python 2 is
> none of those things.
I wasn't aware we were discussing Python 2.
--
https://mai
On Fri, Oct 2, 2015, at 14:27, Kenneth L wrote:
> I tried to use gimp but as a photoshop user it was horrible.
This is off-topic, but have you tried Gimpshop?
--
https://mail.python.org/mailman/listinfo/python-list
And right after I posted this I found all the stuff mentioning someone
had hijacked the name and added spyware... sorry...
On Fri, Oct 2, 2015, at 14:57, Random832 wrote:
> On Fri, Oct 2, 2015, at 14:27, Kenneth L wrote:
> > I tried to use gimp but as a photoshop user it was horrible.
On Mon, Oct 5, 2015, at 09:29, Jaydip Chakrabarty wrote:
> Hello,
>
> I have a csv file like this.
>
> Name,Surname,Age,Sex
> abc,def,,M
> ,ghi,,F
> jkl,mno,,
> pqr,,,F
>
> I want to find out the blank columns, that is, fields where all the
> values are blank. Here is my python code.
>
> fn =
Ben Finney writes:
> The opposite of string typing is weak typing.
Well, I would say *string* typing [as used in, for example, sh and tcl]
is actually a form of weak typing. But anyway, the other issue is that
strong typing is meaningless. In general it seems like weak typing means
"the existence
Victor Hooi writes:
> My question, is there a more lenient, or relaxed JSON parser available
> for Python, that will try to do a best-efforts parsing of non-spec
> JSON?
In an answer to a similar question on StackExchange, using YAML was
suggested.
http://stackoverflow.com/questions/9104930
Is
Ian Kelly writes:
> You couldn't do this with a __future__ import because those must be
> confined to the importing module and are therefore generally limited
> to syntax changes.
In principle, it could be a syntax change to the < operator (etc) to
cause it to try to call a different method first
lucasfneves14 writes:
> How did you do it?
That's an impressive reply gap.
If anyone's wondering, this is apparently in reply to this from March:
http://thread.gmane.org/gmane.comp.python.general/774441
--
https://mail.python.org/mailman/listinfo/python-list
jon...@mail.python.org writes:
>
> The below pseudo code is distilled from my 1st attempt at a functional
> Python program on the RasPi.
>
> My questions are:
> What is the scope of class variables?
You must access them as members of the class or an instance of the class.
> does the self. prefix
Dennis Lee Bieber writes:
> On Sat, 31 Oct 2015 02:09:27 +1100, Chris Angelico
>>On Sat, Oct 31, 2015 at 1:53 AM, josephine ewers via Python-list
>>> Hi,
>>> I am doing an online training course to learn python but when I enter
>>> 'python' in Microsoft PowerShell as I am supposed to do I always
Dennis Lee Bieber writes:
> If a fire did occur, and the inspectors find traces of wiring
> going into what was supposed to be a stand-alone detector there is
> a risk that it will be concluded that the detector had been
> tampered with and may not have been functional... And that could
> lead to
Nobody writes:
> It's probably related to the fact that std{in,out,err} are Unicode
> streams.
There's no fundamental reason a Unicode stream should have to be line
buffered. If it's "related", it's only in that an oversight was made in
the course of making that change.
--
https://mail.python
George Trojan writes:
> This does set line buffering, but does not change the behaviour:
The opposite of line buffering is not no buffering, but full
(i.e. block) buffering, that doesn't get flushed until it runs
out of space. TextIOWrapper has its own internal buffer, and its
design apparently d
Wolfgang Maier writes:
> Standard I/O streams are line-buffered only if interactive (i.e.,
> connected to a console), but block-buffered otherwise.
That's not appropriate for stderr, nor is it justified by the argument
that Terry Reedy cited earlier. I had assumed he was making an implicit
claim
Chris Angelico writes:
> As someone who grew up on MS-DOS, I'd like to mention that EDLIN's
> value wasn't in the obvious places. There were two features it had
> that most other editors didn't: firstly, it would read only as much of
> the file as it needed, so you could edit a file larger than av
Grant Edwards writes:
> On 2015-11-05, Random832 wrote:
>> Of course, both of those things are also true of ed.
>
> Well, maybe not for you. I knew people who (yonks ago) used 'ed' for
> regular file editing. And I remember using the VMS line-editor for
> re
Peter Otten <__pete...@web.de> writes:
> I'm not sure about this one; one purpose of REMAINDER is to pass on the
> unprocessed arguments to another program/script, and this might follow the
> same convention. Should
>
> parser.add_argument('-v', '--verbose', action='store_true')
> parser.add_arg
Steven D'Aprano writes:
> Surely that is obvious? I don't speak much C, but I would expect that inside
> the functions, const parameters can be read, but not assigned to. "*const"
> is a mystery to me though.
There's a program (and now a website) called cdecl that can decode these:
char *const e
Steven D'Aprano writes:
> The compiler doesn't need to decide in advance whether or not the module
> attributes have been changed. It can decide that at runtime, just before
> actually looking up the attribute. In pseudo-code:
>
> if attribute might have changed:
> use the slow path ju
Dennis Lee Bieber writes:
> To be strict -- a text file has system defined means of marking
> line endings. UNIX/Linux uses just a character; Windows uses the pair
> . TRS-DOS used just for end of line. Some operating systems
> may have used count-delimited formats (and then there is the
Dennis Lee Bieber writes:
>
> Given that a dram is 1/8 of a "fluid ounce" that leads to the
> conclusion that a "wee dram" is based on US standard fluid once,
29.6 ml
> vs British standard fluid ounce...
28.4 ml
It's our _pints_ that are smaller than yours, not our ounces.
--
https://m
Dennis Lee Bieber writes:
> Given that a dram is 1/8 of a "fluid ounce" that leads to the
> conclusion that a "wee dram" is based on US standard fluid once,
29.6 ml
> vs British standard fluid ounce...
28.4 ml
It's our _pints_ that are smaller than yours, not our ounces.
--
https://mai
Marko Rauhamaa writes:
> Actually, the real question is, is the unary - *really* so useful that
> it merits existence or is it just something that was mindlessly copied
> into programming languages from elementary school arithmetics?
The alternative, if you want to be able to specify negative num
ryguy7272 writes:
> text_file = open("C:/Users/rshuell001/Desktop/excel/Text1.txt", "wb")
Remove the "b" from this line. This is causing it to omit the
platform-specific translation of "\n", which means some Windows
applications will not recognize the line endings.
--
https://mail.python.org/ma
On 2015-11-20, Dennis Lee Bieber wrote:
> You can substitute list() where ever you use [] with
> no
> effective change in the semantics. (I wouldn't be surprised if the parser
> was doing that behind the scenes anyway).
No, because list() does a name lookup on "list" (wh
On 2015-11-20, BartC wrote:
> Finally, a down-to-earth example. Here it probably doesn't matter at
> what point 'global_database' gets bound. You know it will always refer
> to the current state of global_database, and you know that it is a data
> structure external to the function even if it i
On Thu, Sep 18, 2014, at 14:45, Chris Kaynor wrote:
> Additionally, you may want to specify binary mode by using
> open(file_path,
> 'rb') to ensure platform-independence ('r' uses Universal newlines, which
> means on Windows, Python will convert "\r\n" to "\n" while reading the
> file). Additional
On Wed, Sep 24, 2014, at 10:26, Ian Kelly wrote:
> This depends entirely on your implementation of the modulo operation,
> which is an issue of computing since the operator is not used in
> mathematics.
Wikipedia suggests that "remainders from Euclidean division" should be
used. In Euclidean divis
On Wed, Sep 24, 2014, at 00:57, Miki Tebeka wrote:
> On Tuesday, September 23, 2014 4:37:10 PM UTC+3, Peter Otten wrote:
> > x eq y
> > y eq z
> > not (x eq z)
> >
> > where eq is the test given above -- should x, y, and z land in the same bin?
> Yeah, I know the counting depends on the order of
On Fri, Sep 26, 2014, at 14:30, Rob Gaddi wrote:
> The "histogram" bin solution that everyone keeps trying to steer you
> towards is almost certainly what you really want. Epsilon is your
> resolution. You cannot resolve any information below your resolution
> limit. Yes, 1.49 and 1.51 wind up i
On Tue, Oct 7, 2014, at 16:27, Michael Torrie wrote:
> That's really interesting. I looked briefly at the page. How does your
> python extension work with xywrite? Does it manipulate xywrite
> documents or does it tie in at runtime with Xywrite somehow? If so, how
> does it do this? Crossing t
On Wed, Oct 8, 2014, at 15:38, Ethan Furman wrote:
> LOL, no kidding! The main reason I bother using the operator module is
> for the readability of not seeing the dunders,
> and the writability of not having to type them.
I'm not sure what situation you would have to type them (as opposed to
On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote:
> When I first read this I was extremely jealous of the originator but
> having used it umpteen times I'm still extremely jealous of the
> originator!!! Why doesn't my mind work like his? :)
You could also keep the ints in two variables and do
On Thu, Oct 9, 2014, at 05:26, Terry Reedy wrote:
> On 10/9/2014 2:52 AM, Rustom Mody wrote:
> > Particularly with macs my knowledge is at the level:
> > "How the ^%*)( do you right click without a right-click button?"
>
> I believe control-click, but Macs users could say better.
Control-click wa
On Fri, Oct 10, 2014, at 03:53, Mark H Harris wrote:
> The apple mouse has only one click in the hardware... but, through the
> software (settings) the apple hardware 'know' which side of the mouse
> you are pushing over.
It only has one physical switch (I'm not sure the latest ones have any
at
On Mon, Oct 20, 2014, at 16:33, Albert-Jan Roskam wrote:
> Hi,
>
> The locale category LC_CTYPE may affect character classification and case
> conversion.
>
> That's the theory. Can you give a practical example where this locale
> setting matters? Eg.:
> locale.setlocale(locale.LC_CTYPE, loc)
> m
On Tue, Oct 21, 2014, at 19:16, Dan Stromberg wrote:
> Actually, doesn't line buffering sometimes exist inside an OS kernel?
> stty/termios/termio/sgtty relate here, for *ix examples. Supporting
> code: http://stromberg.dnsalias.org/~strombrg/ttype/ It turns on
> character-at-a-time I/O in the tt
On Tue, Feb 7, 2017, at 15:08, Michael Torrie wrote:
> Seems like we're getting a bunch of messages on the mailing list that
> appear to be copies of real member posts that are saying they are from
> @f38.n261.z1? They don't appear to be deliberate impersonations. Some
> misconfigured server refl
On Sun, Mar 19, 2017, at 18:48, Mikhail V wrote:
> Sadly, many people believe that a code editor
> should be monospaced, but generally that does not
> have any sense.
It's also a bit self-reinforcing because there aren't many good coding
fonts that are proportional. And in fact there are issues fo
On Thu, Apr 20, 2017, at 16:01, Grant Edwards wrote:
> On 2017-04-20, MRAB wrote:
> > There _is_ a "universal solution"; it's called a Hollerith constant. :-)
>
> Wow, I haven't seen one of those in a _long_ time -- probably about 45
> years. I think the first FORTAN implementation I used was WA
On Fri, Jul 7, 2017, at 04:12, Gregory Ewing wrote:
> Only if you interpret the word "address" very narrowly.
>
> By the way, even the low-level notion of "address" that C
> programs deal with is, on most modern hardware, a *virtual*
> address that goes through a level of translation before it
> i
On Fri, Jul 7, 2017, at 10:41, Nathan Ernst wrote:
> Looks like single expression statements are handled a bit differently
> than
> multiple expression statements:
>
> Python 3.5.2 (default, Nov 17 2016, 17:05:23)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyright", "credits" or "license" f
On Fri, Jul 14, 2017, at 08:33, Chris Angelico wrote:
> What do you mean about regular expressions? You can use REs with
> normalized strings. And if you have any valid definition of "real
> character", you can use it equally on an NFC-normalized or
> NFD-normalized string than any other. They're j
On Fri, Jul 14, 2017, at 04:15, Marko Rauhamaa wrote:
> Consider, for example, a Python source code
> editor where you want to limit the length of the line based on the
> number of characters more typically than based on the number of pixels.
Even there you need to go based on the width in charac
On Sun, Jul 16, 2017, at 01:37, Steven D'Aprano wrote:
> In a *well-designed* *bug-free* monospaced font, all code points should
> be either zero-width or one column wide. Or two columns, if the font
> supports East Asian fullwidth characters.
What about Emoji?
U+1F469 WOMAN is two columns wide
On Tue, Jul 18, 2017, at 10:23, Anders Wegge Keller wrote:
> På Tue, 18 Jul 2017 23:59:33 +1000
> Chris Angelico skrev:
> > On Tue, Jul 18, 2017 at 11:11 PM, Steve D'Aprano
> >> (I don't think any native English words use a double-V or double-U, but
> >> the possibility exists.)
>
> > vacuum.
On Tue, Jul 18, 2017, at 19:21, Gregory Ewing wrote:
> Random832 wrote:
> > What about Emoji?
> > U+1F469 WOMAN is two columns wide on its own.
> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
>
> The term "emoji" is becoming rather strained
On Tue, Jul 18, 2017, at 22:49, Steve D'Aprano wrote:
> > What about Emoji?
> > U+1F469 WOMAN is two columns wide on its own.
> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
> > U+200D ZERO WIDTH JOINER is zero columns wide on its own.
>
>
> What about them? In a monospaced font, th
On Thu, Jul 20, 2017, at 01:15, Steven D'Aprano wrote:
> I haven't really been paying attention to Marko's suggestion in detail,
> but if we're talking about a whole new data type, how about a list of
> nodes, where each node's data is a decomposed string object guaranteed to
> be either:
How a
On Fri, Aug 18, 2017, at 03:39, Marko Rauhamaa wrote:
> BTW, I was reading up on the history of ASCII control characters. Quite
> fascinating.
>
> For example, have you ever wondered why DEL is the odd control character
> out at the code point 127? The reason turns out to be paper punch tape.
> By
On Sun, Aug 27, 2023, at 17:19, Rob Cliffe via Python-list wrote:
> I understand that this is an error: I'm telling the f-string to expect
> an integer when in fact I'm giving it a Decimal.
> And indeed f"{x:3}" gives ' 42' whether x is an int or a Decimal.
> However, to my mind it is not the form
701 - 757 of 757 matches
Mail list logo