I have a function that I use to retrieve daily data from a
home-brew database. Its calling sequence is;
def TempsOneDay( year, month, date ):
After using it (and its friends) for a few years, I've come to
realize that there are times where it would be advantageous to
invoke it with a datetime.da
On 5/11/22 06:33, Michael F. Stemper wrote:
I have a function that I use to retrieve daily data from a
home-brew database. Its calling sequence is;
def TempsOneDay( year, month, date ):
After using it (and its friends) for a few years, I've come to
realize that there are times where it would be
On 2022-05-11 at 08:33:27 -0500,
"Michael F. Stemper" wrote:
> I have a function that I use to retrieve daily data from a
> home-brew database. Its calling sequence is;
>
> def TempsOneDay( year, month, date ):
>
> After using it (and its friends) for a few years, I've come to
> realize that th
>> I have a function that I use to retrieve daily data from a
>> home-brew database. Its calling sequence is;
>>
>> def TempsOneDay( year, month, date ):
>>
>> After using it (and its friends) for a few years, I've come to
>> realize that there are times where it would be advantageous to
>> invok
On 2022-05-11, David Raymond wrote:
> Maybe not the prettiest, but you could also define it like this,
> which also wouldn't require changing of any existing calls or the
> main body of the function past this if block.
>
> def TempsOneDay(*dateComponents):
> if len(dateComponents) == 3:
>
Why not do :
def TempsOneDayDT(date:datetime.date):
return TempsOneDay(date.year, date.month, date.day)
No repeat of code - just a different interface to the same
functionality.
-- Original Message --
From: "Michael F. Stemper"
To: python-list@python.org
Sen
On Mon, 9 May 2022 at 23:15, Dennis Lee Bieber
wrote:
>
> On Mon, 9 May 2022 21:11:23 +0200, Marco Sulla
> declaimed the following:
>
> >Nevertheless, tail is a fundamental tool in *nix. It's fast and
> >reliable. Also the tail command can't handle different encodings?
>
> Based upon
> ht
On Thu, 12 May 2022 at 06:03, Marco Sulla wrote:
> I suppose this function is fast. It reads the bytes from the file in chunks
> and stores them in a bytearray, prepending them to it. The final result is
> read from the bytearray and converted to bytes (to be consistent with the
> read method).
>
On Wed, 11 May 2022 at 22:09, Chris Angelico wrote:
>
> Have you actually checked those three, or do you merely suppose them to be
> true?
I only suppose, as I said. I should do some benchmark and some other
tests, and, frankly, I don't want to. I don't want to because I'm
quite sure the impleme
On Thu, 12 May 2022 at 07:27, Marco Sulla wrote:
>
> On Wed, 11 May 2022 at 22:09, Chris Angelico wrote:
> >
> > Have you actually checked those three, or do you merely suppose them to be
> > true?
>
> I only suppose, as I said. I should do some benchmark and some other
> tests, and, frankly, I
On Thu, 12 May 2022 06:07:18 +1000, Chris Angelico
declaimed the following:
>I don't understand why this wants to be in the standard library.
>
Especially as any Linux distribution probably includes the compiled
"tail" command, so this would only be of use on Windows.
Under recen
Just FYI, UNIX had a bunch of utilities that could emulate a vanilla version of
tail on a command line.
You can use sed, awk and quite a few others to simply show line N to the end of
a file or other variations.
Of course the way many things were done back then had less focus on efficiency
than
This seems to be a regular refrain where someone wants something as STANDARD in
a programming language or environment and others want to keep it lean and mean
or do not see THIS suggestion as particularly important or useful.
Looking at the end of something is extremely common. Packages like nump
On 10/05/2022 15:04, Dan Stromberg wrote:
On Tue, May 10, 2022 at 3:15 AM Chris Angelico wrote:
> It is often the case that developer write Code in Python and
then convert to a C extension module for performance regions.
>
> A C extension module has a lot of boiler plate code
14 matches
Mail list logo