Re: clean way prepend an element to a numpy array

2009-07-21 Thread greg
bdb112 wrote: I saw this interest syntax on this site x[:0]=0 I guess that is cute, but could be confusing(and doesn't work) It does if you use an array of the appropriate type on the right hand side: a[:0] = array('i', [0]) -- Greg -- http://mail.python.org/mailman/

Re: clean way prepend an element to a numpy array

2009-07-24 Thread greg
Robert Kern wrote: a[:0] = array('i', [0]) Not when 'a' is a numpy array rather than an array.array. That's true, but I got the impression that the OP was talking about array.array, not numpy.array. It's very confusing having two widely-used types both called

Re: missing 'xor' Boolean operator

2009-07-26 Thread greg
c, but if I did, I would tend to think he meant to say that none of a, b, c are equal to any other. That's not what it means in Python, though. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Distinguishing active generators from exhausted ones

2009-07-26 Thread greg
trace mechanism. There really ought to be a 'yield' event to distinguish yields from returns. You could put in a feature request on python-dev concerning this. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-27 Thread greg
Bearophile wrote: Was this link, shown by William, not enough? http://hg.flibuste.net/libre/games/cheval/file/46797c3a5136/chevalx.pyx#l1 Yes, sorry, I posted too soon. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-29 Thread greg
, TO_PROCEED_TO = moo) d.quack() -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-31 Thread greg
can obfuscate things just as much if you really want! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Python processors? : WAS Re: Does python have the capability for driver development ?

2009-08-01 Thread greg
t killed things like the Lisp machine. Their developers couldn't keep up with the huge resources that people like Intel and Motorola had to throw at CPU development, so eventually a general-purpose CPU could run Lisp faster than a Lisp machine. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Help understanding the decisions *behind* python?

2009-08-03 Thread greg
there was an ambiguity between multiple args and a single arg that happened to be a tuple. This was before keyword arguments existed -- they would have been hard to incorporate into the old scheme. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: fast video encoding

2009-08-04 Thread greg
table custom compressor. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in format specification in Python 3?

2009-08-11 Thread greg
s, etc. If you don't want that, then write the format string as 'This is a hex number: 0x{:08x}' -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-11 Thread greg
ot to know which manual to look in. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread greg
d and fw to the writing thread. You could also try avoiding file objects altogether and use the raw system calls in the os module. Since you're not using any buffering, there's little reason to use the stdio layer. If you do that, you should be able to use the same file descriptor for

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-15 Thread greg
stdio object is being locked while one of the threads is using it, which would also account for the observed half-duplex behaviour. Another good reason to steer clear of file objects! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing Python Opcodes

2009-08-18 Thread greg
ue of attack would be to use your python to compile a known piece of code that exercises all the opcodes, and compare the result with that from a standard python. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: define class over 2 files

2009-08-18 Thread greg
import A_Part1 from A_Part2 import A_Part2 class A(A_Part1, A_Part2): ... -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Identifying a class type - bad practice?

2009-08-19 Thread greg
James Harris wrote: I don't know yet whether it will be easier to modify the tree or to create a new one for each phase. You can create a new tree using this style as well. Just have each method create and return a new node instead of modifying the existing one. -- Greg --

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-23 Thread greg
J. Cliff Dyer wrote: What happens if you use a literal like 0x10f 304? To me the obvious thing to do is concatenate them textually and then treat the whole thing as a single numeric literal. Anything else wouldn't be sane, IMO. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: __import__(x) VS __import__(x, {}, {}, [''])

2009-08-23 Thread greg
x27; statement always calls it with the current globals() and locals(). If you pass an empty dict for 'globals', I think the effect will be to cause the module name to always be interpreted as a top-level module (i.e. no relative import). But I'm not sure. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Literal concatenation, strings vs. numbers

2009-08-24 Thread greg
e how there could be any great difficulty with implementing that -- it only affects the scanner. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with Python scoping rules

2009-08-27 Thread greg
ss, in the module where the class is defined. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of the Unicode standard

2009-09-19 Thread greg
xpressed the precise concept I had in mind. Yet I was clearly capable of thinking about it, otherwise I wouldn't have noticed that I was missing a word! So in my humble opinion, the strong form of the Sapir-Whorf hypothesis is bunk. :-) -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison of parsers in python?

2009-09-21 Thread greg
one who doesn't understand the field (i.e. anything which doesn't use a DFA). Plex uses a DFA. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: object.enable() anti-pattern

2013-05-09 Thread Greg Ewing
file already exists. The read/write modes don't really come into it, as far as I know. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: object.enable() anti-pattern

2013-05-12 Thread Greg Ewing
ething, namely a Foo that hasn't been enabled yet. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Help using Tix and tix.balloon in tkinter.ttk Gui on Py 3.2.3, Mac OS X 10.6.8

2012-07-04 Thread Greg Edwards
ac for tixlib files, no luck. Looks like you can build Tix from source and install, but web posts indicate this is very hard and I don't see any useful traffic on that in the last 2 or 3 years, never a good sign. Any pointers appreciated ! Hope I don't get flamed, I see this group has some epic flame wars. Cheers, -- Greg Edwards, Port Jackson Bioinformatics gedwar...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on the future of Python

2012-09-27 Thread Greg Donald
PRODUCT owned by a for-profit company. PostgreSQL is an open-source PROJECT and is unowned. A lot of the major technical differences are outlined here: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on the future of Python

2012-09-27 Thread Greg Donald
layers.. so flipping back and forth to see which database is better for your particular app and workload is trivial. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Re: Multi-dimensional list initialization

2012-11-07 Thread Greg Ewing
x27;t think it's all that bad if you regard the tuple as effectively part of the syntax. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime - dates formatted differently on different computers

2012-12-11 Thread Greg Donald
date formats I've thrown at it. from dateutil.parser import parse dt = parse( whatever ) I've throw all kind of date and timestamps at it.. have yet to see anything it won't parse. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime - dates formatted differently on different computers

2012-12-11 Thread Greg Donald
r unknown locale strings. >>>> parse('1.2.2013') # ambiguous, I know > datetime.datetime(2013, 1, 2, 0, 0) # should be datetime.datetime(2013, 2, 1, > 0, 0) In [2]: parse('1.2.2013', dayfirst=True) Out[2]: datetime.datetime(2013, 2, 1, 0, 0) -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Re: strptime - dates formatted differently on different computers

2012-12-11 Thread Greg Donald
was tasked with parsing and dial it in using the appropriate dayfirst, yearfirst, etc. options. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Greg Donald
my dream job? Doubt it, but good luck all the same :) > Please suggest me Visit their job boards. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list

Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
ome really awesome people. Thanks in advance for your help. -- *Greg Harezlak* 1 Bush Street, 7th Floor San Francisco, CA 94104 (T): 925.683.8578 (E): g...@tinyco.com <http://twitter.com/#!/gharezlak> <http://www.facebook.com/gharezlak><http://www.linkedin.com/in/

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
perimental > http://githire.com/ are two excellent developer-friendly solutions for > that. > > - Philipp > > On 03/01/2012 12:08 AM, Greg Harezlak wrote: > > Hello Python Community, > > > > I work for a mobile gaming startup in San Francisco, and we're heavily &

Python 3.2 and MS Outlook

2012-03-07 Thread Greg Lindstrom
Is there documentation showing how to read from a Microsoft Outlook server using Python 3.2. I've done it with 2.x, but can't find anything to help me with 3.2. Thanks, --greg -- http://mail.python.org/mailman/listinfo/python-list

Overlayong PDF Files

2012-04-26 Thread Greg Lindstrom
lose enough for scanning. I'd like to read in the "official" form and add my data. Is this possible? Thanks, --greg -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyGUI 2.5

2011-06-17 Thread Greg Ewing
PyGUI 2.5 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Lots of new stuff in this version. Highlights include: - Improved facilities for customising the standard menus. - Functions for creating PyGUI Images from PIL images and numpy arrays. - ListButton - a pop

ANN: PyGUI 2.5.3

2011-07-16 Thread Greg Ewing
PyGUI 2.5.3 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Clipboard access now implemented on MacOSX, plus a few bug fixes. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewin

Re: Tk MouseWheel Support

2011-03-15 Thread Greg Couch
On Mar 10, 1:37 pm, Corey Richardson wrote: > On 03/10/2011 03:35 PM, Corey Richardson wrote: > > > Middle button is Button-3 IIRC, and I think it'd be MouseUp and > > MouseDown. I'm really not sure though. > > It's Button-2 rather. > > -- > Corey Richardson Middle button is button-3 on Mac OS X,

ANN: PyGUI 2.4

2011-03-19 Thread Greg Ewing
PyGUI 2.4 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Highlights of this release: * Python 3 Compatible on MacOSX and Windows. * ScrollableView has been overhauled on Windows and should now work with all builds of pywin32 as far as I know. What is PyGUI? ---

Re: Feature suggestion -- return if true

2011-04-17 Thread Greg Ewing
jects needlessly? def get_from_cache(x): if not x in cache: cache[x] = compute_from(x) return cache[x] That looks up the cache *twice* for every access. Mine only does one lookup when the item is already in the cache. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

ANN: SuPy 1.6 for Snow Leopard and Python 2.7

2011-04-24 Thread Greg Ewing
for the Sketchup 3D modelling application that lets you script it in Python. -- Greg Ewing greg.ew...@canterbury.ac.nz -- http://mail.python.org/mailman/listinfo/python-list

Dictionary from String?

2011-05-08 Thread Greg Lindstrom
Is it possible to create a dictionary from a string value? Something along these lines (but that works): >>> mystring = "{'name':'greg','hatsize':'7 5/8'}" >>> mystring "{'name':'greg','hatsize&

Re: "help( pi )"

2017-11-19 Thread Greg Ewing
ou want it to have a distinct docstring, e.g. MAX_BUFSIZE = int(8192, __doc__ = 'Size of the hardware buffer used for I/O on this device.') -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread Greg Tibbet
ellipse() Okay, fine... but WHERE is draw_ellipse defined?? What magic is happening there? I've searched the entire PIL directory tree, and the ONLY two places draw_ellipse is mentioned are right there in the ellipse() function... WHAT am I missing?? Thanks! -Stumpy (aka Greg) -- https://mail.python.org/mailman/listinfo/python-list

Re: Pre-Pre-PEP: The datetime.timedeltacal class

2022-04-16 Thread Greg Ewing
, cuts off an extra 6 and adds them in. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Why no list as dict key?

2022-04-20 Thread Greg Ewing
could fail to find it. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Why no list as dict key?

2022-04-20 Thread Greg Ewing
. It sounds like you would be better off making all your equation data structures immutable. Instead of mutating the equation when making a transformation, return a new equation. Then you can use sets and dicts to cache them etc. without any problems. -- Greg -- https://mail.python.org/mailman

Re: code issue

2022-04-21 Thread Greg Ewing
ve a loop which is supposed to repeatedly read a value for n and then compute fizzbuzz, and you have the input statement in the wrong place. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Enums and nested classes

2022-04-21 Thread Greg Ewing
about its current behaviour that you think should be different? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python/New/Learn

2022-05-06 Thread Greg Ewing
French for 5 years in school, with teachers to learn the pronunication from, but I never got a lot of practice at it or much chance to hear it spoken. As a result I have about a 1% success rate at understanding spoken French, even when I know all the words being used. -- Greg -- https://mail.

Re: Seeking deeper understanding of python equality (==)

2022-05-06 Thread Greg Ewing
see that in pdb because it doesn't involve any Python code. Since strings don't know how to compare themselves with uuids, it will return NotImplemented and the interpreter will then call uuid's method. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: tail

2022-05-09 Thread Greg Ewing
that are self-synchronising) but it won't work for arbitrary encodings. Given that limitation, I don't think it's reliable enough to include in the standard library. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Changing calling sequence

2022-05-15 Thread Greg Ewing
essary and confusing. I suspect that wasn't a deliberate design decision, but just a side effect of using a single class dict for both class and instance things. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: min, max with position

2022-06-04 Thread Greg Ewing
ell = l one = 1 min(enumerate(ell), key=lambda x: x[one]) Hope that clears it up!11!one!ell -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Greg Ewing
phens, commas, etc. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Greg Ewing
On 9/06/22 5:55 am, Dennis Lee Bieber wrote: There are no mutable strings in Python. If you really want a mutable sequence of characters, you can use array.array, but you won't be able to use it directly in place of a string in most contexts. -- Greg -- https://mail.pytho

Re: fill out bulletins

2022-06-13 Thread Greg Ewing
Another possibility is to use reportlab to generate a pdf. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: mapLast, mapFirst, and just general iterator questions

2022-06-14 Thread Greg Ewing
ction, because it ties it together visually and lets me have locals that are properly local. If the file is only ever used as a script, I just put an unconditional call to the main function at the bottom. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
On 21/06/22 2:52 pm, Avi Gross wrote: This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called? (Pronounced with a comical stutter) "C-p-p-python!") -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
date. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
nd the new implementation might be called RPython, or RustyPython, or whatever. The names are independent of which one is currently blessed as the reference implementation. Although if it were called RPython, no doubt a new debate would flare up over whether the "R" stands for "R

Re: "CPython"

2022-06-21 Thread Greg Ewing
g the terms of a licence. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
entence is so badly cobbled together that it could be the output of a KI of some sort (GPT-3) trying to summarize stuff from the web. It looks to me like the output of a Markov chain that's been fed with all the latest programming buzzwords. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Greg Ewing
? Python+=1 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about learning Python

2022-09-09 Thread Greg Ewing
and then moving on to Applesoft BASIC. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: PyObject_CallFunctionObjArgs segfaults

2022-09-30 Thread Greg Ewing
F. You still need to know whether it's a new reference or not and treat it accordingly. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Changing 'Scripts/*.exe'

2022-10-04 Thread Greg Ewing
ave differently, and the Finder doesn't tell you which you're looking at. :-( -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: an oop question

2022-11-02 Thread Greg Ewing
_data = None def push(self, item): result = Stack() result._data = Pair(item, self._data) return result def pop(self): rest = Stack() rest._data = self._data.second() return self._data.first(), rest Note that neither Stack nor Pair inherits from

Re: an oop question

2022-11-02 Thread Greg Ewing
t the length of a structure built out of pairs. But in any case, the way to do this in a conceptually clean way is for the length method of Stack to call whatever it is that computes the length of a linked list of Pairs. This is what the term "delegation" refers to. -- Greg -- https://

Re: an oop question

2022-11-04 Thread Greg Ewing
careful -- a Sequence class would probably be expected to have methods for e.g. inserting and removing things in the middle, which you might not want to allow for a Stack. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: an oop question

2022-11-04 Thread Greg Ewing
er name. Also it has some primitive types such as ints and floats that don't behave in an OO way at all. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: an oop question

2022-11-04 Thread Greg Ewing
overly restrictive, because it wouldn't allow S to override a method of T and make it do something different -- which we do all the time in practice. Class contracts must hold for subclasses. That sounds like a much better way of saying it! -- Greg -- https://mail.python.org/mailman/lis

Re: an oop question

2022-11-04 Thread Greg Ewing
On 4/11/22 7:51 am, Julieta Shem wrote: (The empty documentation seems to satisfy the principle.) All the more reason to document your classes! More seriously, there's always at least a (possibly fuzzily) implied contract, because of the names you choose for things if nothing else. --

Re: an oop question

2022-11-04 Thread Greg Ewing
rely OO" or not, whatever that means, because I don't see purity of OO as a virtue. All I care about is what actual features then language has. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Greg Ewing
On 14/11/22 1:31 pm, Jon Ribbens wrote: On 2022-11-13, DFS wrote: But why is it allowed in the first place? Because it's an expression, and you're allowed to execute expressions. To put it a bit more clearly, you're allowed to evaluate an expression and ignore the r

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-13 Thread Greg Ewing
it should be a warning, and that's what linters are for. I wouldn't like the core interpreter to be producing a bunch of warnings for things like this. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: String to Float, without introducing errors

2022-12-18 Thread Greg Ewing
nt inaccuracies. If you can post some code we might be able to help you further. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: String to Float, without introducing errors

2022-12-19 Thread Greg Ewing
gt;>> dtdm * (1/1000 - 10/1000) 3.4004053539917275e-28 which agrees with your Decimal calculation to 3 digits, and should be as precise as the input numbers (about 4 digits in this case). This is a good example of why it's important to choose an appropriate numerical algorithm! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: NoneType List

2022-12-31 Thread Greg Ewing
and non-mutating methods, and to help catch mistakes resulting from mixing them up. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: To clarify how Python handles two equal objects

2023-01-10 Thread Greg Ewing
*)malloc(3 * sizeof(int)); arr1[0] = 10; arr1[1] = 11; arr1[2] = 12; Does that help your understanding? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast lookup of bulky "table"

2023-01-15 Thread Greg Ewing
a, it will be very fast. If it has to fall back on a linear search, it probably won't be significantly faster than your existing Python implementation. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Improvement to imports, what is a better way ?

2023-01-18 Thread Greg Ewing
rt names for modules that are *very* frequently referenced. Use full unabbreviated names for everything else. * Don't 'import foo as foo', just 'import foo'. * Don't try to line the code up in columns, it doesn't really help readability IMO. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-23 Thread Greg Ewing
e overkill. Just pull the argument out of argv directly. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: bool and int

2023-01-27 Thread Greg Ewing
ng, it will go wrong 255 times out of 256. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-30 Thread Greg Ewing
ve special syntax in the language. Functions don't need to return things to justify their existence, and in fact the usual convention is that functions whose purpose is to have an effect just return None. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-31 Thread Greg Ewing
d code suddenly cease to execute. No, but it was decided that Python 3 would have to be backwards incompatible, mainly to sort out the Unicode mess. Given that, the opportunity was taken to clean up some other mistakes as well. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-31 Thread Greg Ewing
proportion to the problem. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-31 Thread Greg Ewing
to make it easier to write code that would work in both versions. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Licensing?

2023-02-02 Thread Greg Ewing
include the original copyright notice as requested, maybe with a "based on work by..." attribution. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-02-02 Thread Greg Ewing
#x27;t wear out like hardware, you don't have to budget for replacing it. But you can't expect third party software to be maintained forever -- particularly when, as with Python, the maintenance is mainly being done by *volunteers*. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse presence of switch

2021-01-12 Thread Greg Ewing
ment following -r containing a value. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Greg Ewing
On 13/01/21 4:18 am, Grant Edwards wrote: AFAIK, Python can't be used to write device drivers for any popular OS At least not until some crazy person embeds Python in the Linux kernel... -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 13/01/21 7:57 pm, Christian Gollwitzer wrote:  What do you mean, "until" ? https://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c He's using Micropython. That's cheating! :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-13 Thread Greg Ewing
On 14/01/21 11:09 am, Grant Edwards wrote: Perhaps I need to recalibrate my adjectives, but with 256KB+ of flash and 32KB+ of RAM, I wouldn't call them "small" It's small by today's standards, when you consider that multiple GB of RAM is commonplace now in most &

Re: Application window geometry specifier

2021-01-13 Thread Greg Ewing
;t see any harm in allowing the app to *request* (not force) a certain position for a window. The app can of course abuse that privilege, but that's the fault of the app, not the feature. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: why sqrt is not a built-in function?

2021-01-14 Thread Greg Ewing
ng as sqrt, but the sqrt function probably uses a more efficient algorithm. Also, exponentiation assumes you're okay with getting a complex result: >>> (-27)**0.5 (3.181725716174721e-16+5.196152422706632j) So it's not quite the same thing as math.sqrt(). -- Greg -- https:/

Re: conceptual problem (was: A beginning beginner's question about input, output and . . .

2021-01-14 Thread Greg Ewing
ge. So get and set methods are unnecessary and actively discouraged in Python. (C#, if I understand correctly, gets this sort of half-right. You can turn an attribute into a property, and the calling *source* doesn't change, but it all has to be recompiled -- which kind of defeats the purpose.)

Re: Exploring terminfo

2021-01-15 Thread Greg Ewing
o interact badly with Python stdio. Can something be done about this? Maybe Python stdio objects should flush all the C stdio streams before writing anything? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >