On 2023-04-13 03:28:37 +0100, MRAB wrote:
> On 2023-04-13 03:12, avi.e.gr...@gmail.com wrote:
> > I suspect the OP is thinking of languages like PERL or JAVA which guess for
> > you and make such conversions when it seems to make sense.
> >
> In the case of Perl, there are distinct operators for a
On 2023-04-14 10:19:03 +1000, Chris Angelico wrote:
> The entire Presentation Manager and Workplace Shell (broadly
> equivalent to a Linux "desktop manager", I think? Kinda?) were object
> oriented; you would have a WPDataFile for every, well, data file, but
> some of those might be subclasses of W
Of Dennis Lee Bieber
Sent: Friday, April 14, 2023 12:23 AM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On Thu, 13 Apr 2023 20:53:21 -0400, Richard Damon
declaimed the following:
>On 4/13/23 7:25 PM, avi.e.gr...@gmail.com wrote:
>> s there any concept in Python of
{one more entry in the thread drift, and then I think I'll shut up}
On Fri, 14 Apr 2023 17:22:47 +1000, Chris Angelico
declaimed the following:
>Yeah, the "ADDRESS" command has so much potential. Back in the day, I
>built a MUD with REXX scripting, and within those scripts, the defaul
On Fri, 14 Apr 2023 at 17:17, Dennis Lee Bieber wrote:
>
> On Fri, 14 Apr 2023 05:35:22 +1000, Chris Angelico
> declaimed the following:
>
> >It was quite the experience back in the day (as OS/2's native
> >scripting language), and one that I'm truly glad to have had, as it
> >taught me so much a
On Fri, 14 Apr 2023 05:35:22 +1000, Chris Angelico
declaimed the following:
>It was quite the experience back in the day (as OS/2's native
>scripting language), and one that I'm truly glad to have had, as it
>taught me so much about the differences between languages.
>
I still miss the A
On Thu, 13 Apr 2023 20:53:21 -0400, Richard Damon
declaimed the following:
>On 4/13/23 7:25 PM, avi.e.gr...@gmail.com wrote:
>> s there any concept in Python of storing information in some way, such as
>> text, and implementing various ideas or interfaces so that you can query if
>> the contents
what is stored for any
shoppers wondering if you are compatible with their needs.
-Original Message-
From: Python-list On
Behalf Of 2qdxy4rzwzuui...@potatochowder.com
Sent: Thursday, April 13, 2023 10:27 PM
To: python-list@python.org
Subject: Re: RE: Weak Type Ability for Python
On 2023-04
On 4/13/2023 10:14 PM, avi.e.gr...@gmail.com wrote:
Alan,
Your guess is not quite what I intended.
Something like a C union is just a piece of memory large enough to hold one of
several kinds of content and some way to figure out which is currently in place.
I am looking at a data structure t
On 2023-04-13 at 22:14:25 -0400,
avi.e.gr...@gmail.com wrote:
> I am looking at a data structure that is an object of some class and
> stores the data in any way that it feels like. But it may be a bit of
> a chameleon that shows one face or another as needed. I can write code
> now that simply ad
text
albeit may be implemented in some projects to bridge things as described or in
other novel ways.
-Original Message-
From: Alan Gauld
Sent: Thursday, April 13, 2023 8:14 PM
To: avi.e.gr...@gmail.com; python-list@python.org
Subject: Re: RE: Weak Type Ability for Python
On 14/04/
On 14/04/23 4:55 am, avi.e.gr...@gmail.com wrote:
While we are at it, why stop with imaginary numbers when you can imagine
extensions thereof? Unfortunately, it has been proven there are and can only
be two additional such constructs.
You can go beyond that if you broaden your horizons enough.
On 4/13/23 7:25 PM, avi.e.gr...@gmail.com wrote:
s there any concept in Python of storing information in some way, such as
text, and implementing various ideas or interfaces so that you can query if
the contents are willing and able to be viewed in one of many other ways?
There is nothing that
On 2023-04-13 08:25:51 -0700, Grant Edwards wrote:
> On 2023-04-13, Cameron Simpson wrote:
> > On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
> >
> >>I suspect the OP is thinking of languages like PERL or JAVA which guess
> >>for you and make such conversions when it seems to make sense.
> >
>
On Fri, 14 Apr 2023 at 09:49, Alan Gauld wrote:
>
> On 13/04/2023 20:35, Chris Angelico wrote:
>
> > REXX - where everything is a string,
>
> > It was quite the experience back in the day (as OS/2's native
> > scripting language),
>
> I briefly met REXX on a mainframe, but I did play with OS/2 for
On 14/04/2023 00:25, avi.e.gr...@gmail.com wrote:
> Is there any concept in Python of storing information in some way, such as
> text, and implementing various ideas or interfaces so that you can query if
> the contents are willing and able to be viewed in one of many other ways?
Are you talking
On 13/04/2023 20:35, Chris Angelico wrote:
> REXX - where everything is a string,
> It was quite the experience back in the day (as OS/2's native
> scripting language),
I briefly met REXX on a mainframe, but I did play with OS/2 for
a year or two. Back when it looked like it might be a rival to
: Python-list On
Behalf Of Chris Angelico
Sent: Thursday, April 13, 2023 3:35 PM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On Fri, 14 Apr 2023 at 03:29, Dennis Lee Bieber
wrote:
>
> On Thu, 13 Apr 2023 12:21:58 +1000, Cameron Simpson
> declaimed the following
On 4/13/23 13:34, Dennis Lee Bieber wrote:
On Thu, 13 Apr 2023 12:21:58 +1000, Cameron Simpson
declaimed the following:
On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
I suspect the OP is thinking of languages like PERL or JAVA which guess
for
you and make such conversions when it seems to
On Fri, 14 Apr 2023 at 03:29, Dennis Lee Bieber wrote:
>
> On Thu, 13 Apr 2023 12:21:58 +1000, Cameron Simpson
> declaimed the following:
>
> >On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
> >>I suspect the OP is thinking of languages like PERL or JAVA which guess
> >>for
> >>you and make suc
On Fri, 14 Apr 2023 at 02:55, wrote:
> And, yes, you can use these critters in python. You can add a quaternion
> type to numpy for example. Yep, octonions too.
Hang on hang on hang on. I can multiply a string by an onion? The
possibilities of script-controlled culinary arts just became that much
On 4/13/2023 2:36 PM, avi.e.gr...@gmail.com wrote:
But having
precedence rules and also allowing the other methods, should work fine for a
good segment of people except perhaps the ones who like Reverse Polish
Notation and insist on 5 4 3 + * instead.
For *reading*, I prefer the usual 5 * (4 +
perhaps the ones who like Reverse Polish
Notation and insist on 5 4 3 + * instead.
-Original Message-
From: Python-list On
Behalf Of aapost
Sent: Thursday, April 13, 2023 12:28 PM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On 4/12/23 04:03, Ali Mohseni Roodbari wrote
On 2023-04-12 at 22:47:17 -0400,
Dennis Lee Bieber wrote:
> REXX -- where everything is considered a string until it needs to be
> something else.
I see your REXX, and raise you an awk,¹ except that awk won't add a
string to a number, or a number to string, but it will concatenate in
both
On 4/12/23 04:03, Ali Mohseni Roodbari wrote:
>
On 4/13/23 07:50, Stefan Ram wrote:
>If tomorrow Python would allow "string+int" and "int+string"
>in the sense of "string+str(int)" and "str(int)+string",
>what harm would be there?
>
>But for now, I think a typical approach would be
On Thu, 13 Apr 2023 12:21:58 +1000, Cameron Simpson
declaimed the following:
>On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
>>I suspect the OP is thinking of languages like PERL or JAVA which guess
>>for
>>you and make such conversions when it seems to make sense.
>
>JavaScript guesses. What
all
kinds of things that MAY on examination turn out to be convertible to an
integer or double.
-Original Message-
From: Python-list On
Behalf Of Chris Angelico
Sent: Thursday, April 13, 2023 12:12 PM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On Fri, 14 Apr
On Fri, 14 Apr 2023 at 02:05, wrote:
> So why not extend it to allow complex numbers?
>
> >>> "Hello" * complex(5,0)
> TypeError: can't multiply sequence by non-int of type 'complex'
> >>> "Hello" * complex(0,5)
> TypeError: can't multiply sequence by non-int of type 'complex'
>
Clearly a missed
-
From: Python-list On
Behalf Of Chris Angelico
Sent: Thursday, April 13, 2023 3:02 AM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On Thu, 13 Apr 2023 at 15:40, wrote:
> And, no, I do not suggest 2.5 be interpreted as putting in an
> approximate percentage so that .8 * &
On 2023-04-13, Cameron Simpson wrote:
> On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
>
>>I suspect the OP is thinking of languages like PERL or JAVA which guess
>>for you and make such conversions when it seems to make sense.
>
> JavaScript guesses. What a nightmare.
So does PHP. What's rea
On 4/13/2023 1:38 AM, avi.e.gr...@gmail.com wrote:
In Python, "+" does not
mean plus at all. It means whatever the programmer wanted it to mean. An
infix line of code that includes "obj1 + obj2" is supposed to investigate
how to do it. I am not sure if some built-in objects may be different, but
print(f'{x}{y}') ?
On Wed, Apr 12, 2023 at 7:06 PM Ali Mohseni Roodbari <
ali.mohseniroodb...@gmail.com> wrote:
> Hi all,
> Please make this command for Python (if possible):
>
> >>> x=1
> >>> y='a'
> >>> wprint (x+y)
> >>> 1a
>
> In fact make a new type of print command which can print and show
On Thu, 13 Apr 2023 at 15:40, wrote:
> And, no, I do not suggest 2.5 be interpreted as putting in an
> approximate percentage so that .8 * "Hello" should result in "Hell" ...
$ pike
Pike v8.1 release 15 running Hilfe v3.5 (Incremental Pike Frontend)
Ok.
> "Hello, world! " * 2.5;
(1) Result: "Hell
lo" * int(2.6)
'HelloHello'
There is a parallel argument here in arguing it should accept a float and
truncate it. But since you can easily cast a float to an int, in any of many
ways, why have the program choose when it quite likely reflects an error in
the code. And, no, I do not
On 13Apr2023 03:36, MRAB wrote:
I thought that in Java you can, in fact, concatenate a string and an
int, so I did a quick search online and it appears that you can.
I stand corrected. I could have sworn it didn't, but it has been a long
time. - Cameron Simpson
--
https://mail.python.org/ma
n-list On
Behalf Of 2qdxy4rzwzuui...@potatochowder.com
Sent: Wednesday, April 12, 2023 3:17 PM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On 2023-04-12 at 14:51:44 -0400,
Thomas Passin wrote:
> On 4/12/2023 1:11 PM, Chris Angelico wrote:
> > On Thu, 13 Apr 2023 at 03:
On 2023-04-13 03:21, Cameron Simpson wrote:
On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
I suspect the OP is thinking of languages like PERL or JAVA which guess
for
you and make such conversions when it seems to make sense.
JavaScript guesses. What a nightmare. Java acts like Python and
gs).
Python does not generally choose that as it is quite easy to use one of so
many methods, and lately an f-string is an easy way as others mentioned.
-Original Message-
From: Python-list On
Behalf Of Thomas Passin
Sent: Wednesday, April 12, 2023 2:52 PM
To: python-list@python.org
S
On 12Apr2023 22:12, avi.e.gr...@gmail.com wrote:
I suspect the OP is thinking of languages like PERL or JAVA which guess
for
you and make such conversions when it seems to make sense.
JavaScript guesses. What a nightmare. Java acts like Python and will
forbid it on type grounds (at compile t
, April 12, 2023 2:52 PM
To: python-list@python.org
Subject: Re: Weak Type Ability for Python
On 4/12/2023 1:11 PM, Chris Angelico wrote:
> On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
> wrote:
>>
>> Hi all,
>> Please make this command for Python (if possible):
>>
On 2023-04-12 at 14:51:44 -0400,
Thomas Passin wrote:
> On 4/12/2023 1:11 PM, Chris Angelico wrote:
> > On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
> > wrote:
> > >
> > > Hi all,
> > > Please make this command for Python (if possible):
> > >
> > > > > > x=1
> > > > > > y='a'
> > > > > >
On 2023-04-12, Ali Mohseni Roodbari wrote:
> Hi all,
> Please make this command for Python (if possible):
>
x=1
y='a'
wprint (x+y)
1a
If that's what you want, use PHP or some other language. Don't try to ruin
Python.
> In fact make a new type of print command which can print
On 2023-04-12 19:57, Mats Wichmann wrote:
On 4/12/23 11:11, Chris Angelico wrote:
On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
wrote:
Hi all,
Please make this command for Python (if possible):
x=1
y='a'
wprint (x+y)
1a
In fact make a new type of print command which can print and sho
On 4/12/2023 1:11 PM, Chris Angelico wrote:
On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
wrote:
Hi all,
Please make this command for Python (if possible):
x=1
y='a'
wprint (x+y)
1a
In fact make a new type of print command which can print and show strings
and integers together.
Try
On 4/12/23 11:11, Chris Angelico wrote:
On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
wrote:
Hi all,
Please make this command for Python (if possible):
x=1
y='a'
wprint (x+y)
1a
In fact make a new type of print command which can print and show strings
and integers together.
Try:
p
On Thu, 13 Apr 2023 at 03:05, Ali Mohseni Roodbari
wrote:
>
> Hi all,
> Please make this command for Python (if possible):
>
> >>> x=1
> >>> y='a'
> >>> wprint (x+y)
> >>> 1a
>
> In fact make a new type of print command which can print and show strings
> and integers together.
>
Try:
print(x, y)
Hi all,
Please make this command for Python (if possible):
>>> x=1
>>> y='a'
>>> wprint (x+y)
>>> 1a
In fact make a new type of print command which can print and show strings
and integers together.
Sincerely yours,
Ali.
--
https://mail.python.org/mailman/listinfo/python-list
47 matches
Mail list logo