Às 21:08 de 31/10/22, Peter J. Holzer escreveu:
On 2022-10-30 11:26:56 +0100, Peter J. Holzer wrote:
On 2022-10-29 23:59:44 +0100, Paulo da Silva wrote:
The funny thing is that if I replace foos by Foos it works because it gets
known by the initial initialization :-) !
I wish to know why sometimes my notebook won't execute my program And VS code
won't connect to kernels. Thank you Nhlanhla Ndwandwe Sent from my Galaxy
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Mon, 31 Oct 2022 at 14:38, Julieta Shem wrote:
>>
>> Chris Angelico writes:
>>
>> > The most straight-forward way to represent this concept in an
>> > object-oriented way is subclassing.
>> >
>> > class Stack:
>> > ... # put whatever code is common here
>> >
>> >
Alan Gauld writes:
> On 30/10/2022 14:01, Julieta Shem wrote:
>
>> I wrote the classes
>>
>> class Empty:
>> ...
>> class Pair:
>> ...
>>
>> (*) How to build a stack?
>>
>> These Lisp-like sequences are clearly a stack.
>
> That is a very important observation. A Pair IS-A Stack(
I think:
class Stack:
def __init__( self, *args ):
self.data = args
def __str__( self ):
return f"Stack({','.join(str(x) for x in self.data)})"
gives equivalent output for the if len(args) is 0 or 2, if it’s okay for
self.data to be a tuple.
class Stack:
def __init_
> On 1 Nov 2022, at 16:08, nhlanhlah198506 wrote:
>
> I wish to know why sometimes my notebook won't execute my program And VS code
> won't connect to kernels. Thank you Nhlanhla Ndwandwe Sent from my Galaxy
You need to provide details on what you do and what happens.
Reminder do not attach
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Julieta Shem writes:
>>clarify. If I wish for an empty stack, I wish I could just say
> Stack()
>>Stack()
>>and if I wish for a nonempty stack, I'd write
> Stack(1, Stack(2, Stack(3, Stack(
>>Stack(1, Stack(2, Stack(3, Stack(
>
> I
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>The crucial feature OOP adds to this is polymorphism ("late binding").
>
> If polymorphism is so crucial, the idea of subclasses
> has something to it! [...]
I wonder what Rich Hickey would say here
On 11/1/22, darkst...@o2online.de wrote:
>
> **IDLE can’t Import TKINTER
>
> Python may not be configured for TK**
>
> Checkmark for TK is set in the Installation Progress. What went wrong and ho
> can I fix it?
Run the following command to check whether the ImportError has any
further informatio
On 11/1/22, Nithish Ramasamy wrote:
>
> pip install tkinter
> Wait some minutes to install tkinter
There is no tkinter package on PyPI. It's part of the standard library
and included with the python.org installer as an optional component.
--
https://mail.python.org/mailman/listinfo/python-list
10 matches
Mail list logo