Re: super().__init__() and bytes

2024-12-03 Thread Greg Ewing via Python-list
are able to do things that Python methods cannot. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Greg Ewing via Python-list
eason it has to lose data. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve

2024-11-07 Thread Greg Ewing via Python-list
think. BTW you have to be careful testing this, because the compiler sometimes does constant folding, so you need to be sure it's actually computing the numbers at run time. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Specifying local dependency with Poetry

2024-11-05 Thread Greg Ewing via Python-list
on found for first-package<2.0.0,>=1.6.0 (from second-package==0.5.0) What version number does first-package have? The caret in the specification "^1.6.0" restricts it to 1.x.x versions. If you don't want that restriction, use ">=" instead. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

doRe: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-03 Thread Greg Ewing via Python-list
er in that respect. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
ad of collecting the whole list first. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
he > standard is to sync _everything_ Again I'm not sure what you mean here. It may be difficult for the kernel to track down exactly what data is relevant to a particular file, and so the kernel programmers take the easy way out and just implement fsync() as sync(). But again tha

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
written little endian instead of big endian, but the same argument applies either way. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
tions are caught and logged. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-08 Thread Greg Ewing via Python-list
On 8/09/24 11:03 pm, Jon Ribbens wrote: On 2024-09-08, Greg Ewing wrote: try: do something .commit() except: log something .rollback() What if there's an exception in your exception handler? I'd put the rollback in the 'finally' handler, s

Re: psycopg2: proper positioning of .commit() within try: except: blocks

2024-09-07 Thread Greg Ewing via Python-list
.rollback() Doing an explicit rollback ensures that the transaction is always rolled back if it is interrupted for any reason. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Crash when launching python

2024-09-04 Thread Greg Ewing via Python-list
ere's usually just one executable file in there. Run that from a shell and you should see anything written to stdout or stderr. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Greg Ewing via Python-list
set up a local server You should also be able to download a .tar.gz from PyPI and use pip to install that. Although you'll have to track down the dependencies yourself in that case. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Use of statement 'global' in scripts.

2024-05-08 Thread Greg Ewing via Python-list
e-level name from within a function, e.g. spam = 17 def f(): global spam spam = 42 f() # spam is now 42 A script is a module, so everything that applies to modules also applies to scripts. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread Greg Ewing via Python-list
On 30/03/24 7:21 pm, HenHanna wrote: https://xkcd.com/1306/ what does  SIGIL   mean? I think its' a Perl term, referring to the $/@/# symbols in front of identifiers. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: GIL-Removal Project Takes Another Step (Posting On Python-List Prohibited)

2024-03-20 Thread Greg Ewing via Python-list
it usually works. If you run out of memory, you run a GC there and then. You don't have to wait for GCs to occur on a time schedule. Also, as a previous poster pointed out, GCs are typically scheduled by number of allocations, not by time. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: (Mastermind) puzzle (with 3 digits) -- Elegant (readable) code Sought

2024-02-27 Thread Greg Ewing via Python-list
idate) for j, b in enumerate(answer) ) ) This is not correct. score((1,1,1), (1,1,2)) gives (2,4). According to the usual rules of Mastermind, it should be (2, 0). -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Await expressions (Posting On Python-List Prohibited)

2024-01-26 Thread Greg Ewing via Python-list
f it helps at all, you can think of an async function as being very similar to a generator, and "await" as being very similar to "yield from". In the current implementation they're almost exactly the same thing underneath. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
e how weak references help here at all. If the transient object goes away, all references from it to the permanent objects also go away. A weak reference would only be of use if the reference went the other way, i.e. from the permanent object to the transient object. -- Greg -- https://mail.pytho

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
x27;t keep the Form alive after it's been closed. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-15 Thread Greg Ewing via Python-list
On 16/01/24 11:55 am, Mats Wichmann wrote: Windows natively has something called python.exe and python3.exe which is interfering here I'm wondering whether py.exe should be taught to recognise these stubs and ignore them. This sounds like something that could trip a lot of people up. --

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
using regular expressions. Although some might consider that this doesn't contradict your statement about readability. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
cal, Turbo Pascal, Delphi, etc. enjoyed a lot of popularity. A variant of UCSD was the main language for Macintosh application development for a number of years. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
't ignored, it appears in the grammar by means of INDENT and DEDENT lexical tokens. It's true that the meaning of these tokens is described informally elsewhere, but that's true of all the lexical features. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
;t require variables to be declared separately from their use. But this is a very common feature of dynamic languages generally. As language oddities go, it hardly rates a mention. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-13 Thread Greg Ewing via Python-list
x[i] < 10; x[i]++) printf("%d\n", x[i]); } Output: 0 1 2 3 4 5 6 7 8 9 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-13 Thread Greg Ewing via Python-list
"unpacking" in Python. I don't know anything about Hyperspec, so I don't know what it means there. The fact that i was being printed inside the loop made me think that some deeper level of surprise was being intended, such as the value of i somehow getting changed by the as

Re: Extract lines from file, add to new files

2024-01-12 Thread Greg Ewing via Python-list
last): File "", line 1, in NameError: name 'i' is not defined There's no destructuring going on here, just assignment to a sequence item. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: mypy question

2023-12-30 Thread Greg Ewing via Python-list
work too. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Aw: Re: mypy question

2023-12-30 Thread Greg Ewing via Python-list
itself that's the problem, but the fact that there's a *mutable container* containing that type. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: mypy question

2023-12-29 Thread Greg Ewing via Python-list
way to be sure of that. You could try declaring it as a collections.Mapping, which is immutable. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

RE: Subject: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Greg Walters via Python-list
TONNE of examples, full documentation and a number of tutorials. The Sourceforge acts as the main help site, but there is also a Discord site dedicated to help and support. I sincerely hope this helps! Greg Walters -- *My memory check bounced* Greg Walters -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread Greg Walters via Python-list
is can work for any number of modules. You aren't limited to just two. I hope this helps. Greg -- *My memory check bounced* Greg Walters -- https://mail.python.org/mailman/listinfo/python-list

How/where to store calibration values - written by program A, read by program B

2023-12-27 Thread Greg Walters via Python-list
e can then be accessed by both scripts. The biggest caveat is that the shared variable MUST exist before it can be examined or used (not surprising). I sincerely hope this helps. Greg -- *My memory check bounced* Greg Walters -- https://mail.python.org/mailman/listinfo/python-list

Re: Context without manager

2023-11-26 Thread Greg Ewing via Python-list
er: def __init__(self): self.cm = device_open() self.device = self.cm.__enter__() # Other methods here for doing things with # self.device def close(self): self.cm.__exit__(None, None, None) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Context without manager

2023-11-26 Thread Greg Ewing via Python-list
On 27/11/23 9:03 am, Stefan Ram wrote: Above, "have" is followed by another verb in "have been", so it should be eligible for a contraction there! Yes, "been" is the past participle of 'to be", so "I've been" is fine. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: on a tail-recursive square-and-multiply

2023-11-07 Thread Greg Ewing via Python-list
se. That seems too much for my small head. Can you help? Well, there are inherently two cases, and they're different, so I don't think you're doing anything wrong here. It was asymmetrical to begin with. If you were doing it iteratively you would also be leaving the accumulator a

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Greg Ewing via Python-list
cases, such as this one. There are various ways you could work around this. I would suggest moving the offending code outside the class and qualifying the constants it uses with the class name. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-06 Thread Greg Ewing via Python-list
ve what the customer tells you." -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-06 Thread Greg Ewing via Python-list
umber into the landline field or vice versa and reject it, then it can figure out whether it can text to a given numner or not without you having to tell it! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-27 Thread Greg Ewing via Python-list
poke values into RAM to change its behaviour to some extent, and that got them out of trouble a few times, but they couldn't patch the code. It might have been possible with the Gemini computer, since it loaded its code from tape. I don't know if it was ever done, though. --

Re: type annotation vs working code

2023-10-03 Thread Greg Ewing via Python-list
alled, and returns that instance subsequently. The problem then doesn't arise. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Dynamically modifying "__setattr__"

2023-09-29 Thread Greg Ewing via Python-list
, '=', value) a = A() a.x = 1 print('a.x =', a.x) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: error of opening Python

2023-09-26 Thread Greg Ewing via Python-list
On 27/09/23 3:30 pm, Chris Roy-Smith wrote: surely running a 64 bit version of python in a 23mbit version of windows will cause significant problems! 23 millibits? I don't think you'd be able to run much at all with that few bits! :-) -- Greg -- https://mail.python.org/mailman/listi

Re: []=[]

2023-09-22 Thread Greg Ewing via Python-list
On 23/09/23 4:51 am, Stefan Ram wrote: []=[] (Executes with no error.) # []=[] ( 1 ) #\_/# (Executes with no error.) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Getty fully qualified class name from class object

2023-08-22 Thread Greg Ewing via Python-list
On 23/08/23 2:45 am, Ian Pilcher wrote: How can I programmatically get 'logging.Handler' from the class object? Classes have a __module__ attribute: >>> logging.Handler.__module__ 'logging' -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Greg Ewing via Python-list
nch of the if. You need to ensure it's always defined. Here's one way that should work: gttran = _ def foobar(translate): def _(txt): if translate: return gttran(txt) else: return txt return _('Hello') -- Greg -- https://ma

Re: Multiple inheritance and a broken super() chain

2023-07-04 Thread Greg Ewing via Python-list
rs in your ancestry. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Should NoneType be iterable?

2023-06-20 Thread Greg Ewing via Python-list
rather than blindly trying to iterate over the result. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Should NoneType be iterable?

2023-06-19 Thread Greg Ewing via Python-list
I would question the wisdom of designing an API that can return either a sequence or None. If it normally returns a sequence, and there are no items to return, it should return an empty sequence. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Match statement with literal strings

2023-06-07 Thread Greg Ewing via Python-list
way to refer to the value that isn't just a bare name. One way would be to define your constants using an enum: class Options(Enum): RANGE = "RANGE" MANDATORY = "MANDATORY" match stuff: case Options.RANGE: ... case Options.MANDATORY: ... -- Greg

Re: Why does IDLE use a subprocess?

2023-05-30 Thread Greg Ewing via Python-list
ult firewall settings not letting you connect to a local socket (nice one, Microsoft). I don't know whether that's still an issue. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-30 Thread Greg Ewing via Python-list
you would have to do in the face of inactive maintainers regardless of where or how the project was hosted. This is not a github problem or a big-corporation problem, it's a people problem. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Does os.path relpath produce an incorrect relative path?

2023-05-25 Thread Greg Ewing via Python-list
ly an operation on strings, it doesn't look in the file system. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-20 Thread Greg Ewing via Python-list
o it would just be syntactic sugar, which is harder to justify. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-20 Thread Greg Ewing via Python-list
have to be disallowed, as it's not at all clear what it should mean. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: An "adapter", superset of an iterator

2023-05-03 Thread Greg Ewing via Python-list
st that reversed() itself should return a sequence view rather than an iterator. That would require restricting it to working on sequences, which would be an incompatible change. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Greg Ewing via Python-list
ld check for it earlier, but there's still the possibility of a race condition -- someone could delete the folder and replace it with a file in the meantime. Or just delete it and not replace it with anything. So you need to be prepared to deal with failures at any point. -- Greg -- https://mai

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Greg Ewing via Python-list
a package named after the script, e.g. put the local modules used by foo.py into a package called foolib. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Greg Ewing via Python-list
How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script, the embedding application could do it before running the script. -- Greg -- https

Re: Weak Type Ability for Python

2023-04-13 Thread Greg Ewing via Python-list
. There are Clifford algebras, Lie algebras, ... Not sure what any of those should do to strings, though. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Small lament...

2023-04-04 Thread Greg Ewing via Python-list
rrive shortly. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add clickable url links to 3D Matplotlib chart ?

2023-03-29 Thread Greg Ewing via Python-list
/stable/gallery/misc/hyperlinks_sgskip.html -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Greg Ewing via Python-list
t iterates over it. Hopefully that would be implemented in a thread-safe way (although the docs don't currently promise that). -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: What kind of "thread safe" are deque's actually?

2023-03-28 Thread Greg Ewing via Python-list
that? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get get_body() to work? (about email)

2023-03-19 Thread Greg Ewing via Python-list
, and open() is a function again that builds the appropriate combination of underlying objects. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: We can call methods of parenet class without initliaze it?

2023-03-15 Thread Greg Ewing via Python-list
u haven't initialised yet. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
On 10/03/23 4:00 pm, 2qdxy4rzwzuui...@potatochowder.com wrote: My ~/.pythonrc contains the following: import readline import rlcompleter readline.parse_and_bind( 'tab: complete' ) I don't have a ~/.pythonrc, so that's not what's doing it

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
On 10/03/23 2:57 pm, Chris Angelico wrote: import sys; "readline" in sys.modules Is it? Yes, it is -- but only when using the repl! If I put that in a script, I get False. My current theory is that it gets pre-imported when using Python interactively because the repl itself uses it

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
yped before, without having to import anything. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
On 10/03/23 12:43 pm, Grant Edwards wrote: When a computer dies, I generally just cp -a (or rsync -a) $HOME to a new one. Same here, more or less. My current machine has multiple archaeological layers going back about 5 generations of technology... -- Greg -- https://mail.python.org/mailman

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
rasing something that the user didn't type in. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
7;re Dutch?) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
king there. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Feature migration

2023-03-08 Thread Greg Ewing via Python-list
least parttly inspired by functional languages such as Haskell. Haskell has always allowed indentation as one way of expressing structure. Python wasn't the first language to use indentation semantically. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread Greg Ewing via Python-list
e a lot of overlap between entries containing "V" and entries containing "6", so you end up searching the same data multiple times. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread Greg Ewing via Python-list
On 7/03/23 4:35 am, Weatherby,Gerard wrote: If mailing space is a consideration, we could all help by keeping our replies short and to the point. Indeed. A thread or two of untrimmed quoted messages is probably more data than Dino posted! -- Greg -- https://mail.python.org/mailman/listinfo

Re: Cutting slices

2023-03-05 Thread Greg Ewing via Python-list
On 6/03/23 11:43 am, Stefan Ram wrote: A user tries to chop of sections from a string, but does not use "split" because the separator might become more complicated so that a regular expression will be required to find it. What's wrong with re.split() in that case? -

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Greg Ewing via Python-list
impose additional delays before the data actually gets written. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-04 Thread Greg Ewing via Python-list
hing fancy. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-03 Thread Greg Ewing via Python-list
d watch out for horcruxes during code reviews. I'll note that he was fluent in Parseltongue, which is not a good sign. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-02 Thread Greg Ewing via Python-list
e slightly more efficient, as it avoids a global lookup and a function call. But as always, measurement would be required to be sure. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-03-01 Thread Greg Ewing via Python-list
On 2/03/23 10:59 am, gene heskett wrote: Human skin always has the same color Um... no? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: one Liner: Lisprint(x) --> (a, b, c) instead of ['a', 'b', 'c']

2023-02-27 Thread Greg Ewing via Python-list
On 28/02/23 4:24 pm, Hen Hanna wrote: is it poss. to peek at the Python-list's messages without joining ? It's mirrored to the comp.lang.python usenet group, or you can read it through gmane with a news client. -- Greg -- https://mail.python.org/mailma

Re: Python 3.10 Fizzbuzz

2023-02-27 Thread Greg Ewing via Python-list
y are easier to type. I tend to use the convention of double quotes for strings seen by the outside world, and single quotes for internal constants (such as enumerated types that happen to be represented by strings). I guess this means I can't use Black. :-( -- Greg -- https://mail.

Re: it seems like a few weeks ago... but actually it was more like 30 years ago that i was programming in C, and

2023-02-27 Thread Greg Ewing via Python-list
debated, but it wasn't a bug or an accident. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: it seems like a few weeks ago... but actually it was more like 30 years ago that i was programming in C, and

2023-02-27 Thread Greg Ewing via Python-list
sition, I think). The semantics of list comprehensions was originally defined in terms of nested for loops. A consequence was that the loop variables ended up in the local scope just as with ordinary for loops. Later it was decided to change that. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: TypeError: can only concatenate str (not "int") to str

2023-02-25 Thread Greg Ewing via Python-list
go out of their way to read the tutor list -- something that is not of personal benefit to them. Also, pointing people towards tutor lists, if not done carefully, can give the impression of saying "newcomers are not welcome here". That's not a message we want to send to Python n

Re: semi colonic

2023-02-23 Thread Greg Ewing via Python-list
On 24/02/23 9:26 am, avi.e.gr...@gmail.com wrote: Python One-Liners: Write Concise, Eloquent Python Like a Professional Illustrated Edition by Christian Mayer (Author) I didn't know there were any Professional Illustrated Editions writing Pythom. You learn something every day! :-) --

Re: it seems like a few weeks ago... but actually it was more like 30 years ago that i was programming in C, and

2023-02-22 Thread Greg Ewing via Python-list
much better than an interpreter. There are some similarities between Python and Lisp-family languages, but really Python is its own thing. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: semi colonic

2023-02-22 Thread Greg Ewing via Python-list
the other hand, if they really want to, they will still be able to abuse semicolons by doing this sort of thing: a = 5; pass b = 7; pass c = a * b; pass Then everyone will know it's some really serious code! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Introspecting the variable bound to a function argument

2023-02-22 Thread Greg Ewing via Python-list
v2 the term [call by name] suggests this should be possible. But Python doesn't use call-by-name or anything remotely like it. (Even if it did, the word "name" in that context doesn't mean what it sounds like it means. The Algol docs used some words in weird ways.) -- G

Re: Precision Tail-off?

2023-02-17 Thread Greg Ewing via Python-list
ar problem, since 1/3 isn't exactly representable in decimal either. To avoid it you would need to use an algorithm that computes nth roots directly rather than raising to the power 1/n. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: ChatGPT Generated news poster code

2023-02-10 Thread Greg Ewing via Python-list
For a moment I thought this was going to be a script that uses ChatGPT to generate a random news post and post it to Usenet... Which would also have been kind of cool, as long as it wasn't overused. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Organizing modules and their code

2023-02-05 Thread Greg Ewing via Python-list
part of it, and that was something he saw his colleagues failing to do. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Organizing modules and their code

2023-02-04 Thread Greg Ewing via Python-list
devoted to each fruit, but only ever one crate of fruit in each aisle, one would think they could make better use of their shelf space. -- 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: 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-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: evaluation question

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

  1   2   3   4   5   6   7   8   9   10   >