Re: on implementing a toy oop-system

2022-09-23 Thread Meredith Montgomery
Chris Angelico writes: > On Sat, 24 Sept 2022 at 07:52, Meredith Montgomery > wrote: >> >> def Counter(name = None): >> o = {"name": name if name else "untitled", "n": 0} >> def inc(o): >> o["n"] += 1 >> return o >> o["inc"] = inc >> def get(o): >> return o["n"] >>

Re: How would one scrap property listing website like this?

2022-09-23 Thread Leo
On Thu, 22 Sep 2022 09:36:47 -0700 (PDT), tripd...@gmail.com wrote: > https://nigeriapropertycentre.com/ > Has anyone scrap something like this before? > probably i should try power bi first to see if it can? You can try something like this. import urllib.request from bs4 import BeautifulSoup

Re: on implementing a toy oop-system

2022-09-23 Thread Chris Angelico
On Sat, 24 Sept 2022 at 07:52, Meredith Montgomery wrote: > > def Counter(name = None): > o = {"name": name if name else "untitled", "n": 0} > def inc(o): > o["n"] += 1 > return o > o["inc"] = inc > def get(o): > return o["n"] > o["get"] = get > return o > Want a neat

Re: on implementing a toy oop-system

2022-09-23 Thread Meredith Montgomery
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Meredith Montgomery writes: >>Is that at all possible somehow? Alternatively, how would you do your >>toy oop-system? > > Maybe something along those lines: > > from functools import partial > > def counter_create( object ): > object[ "n" ]=