On 2020-04-28 12:32 p.m., Edwin Zimmerman wrote:
On April 28, 2020 9:38 AM Soni L. wrote:
> On 2020-04-28 7:50 a.m., Edwin Zimmerman wrote:
> > On 4/27/2020 11:47 PM, Soni L. wrote:
> > [snip]
> > > tbh my particular case doesn't make a ton of practical sense. I have 
config files and there may be errors opening or
deserializing
> them, and I have a system to manage configs and overrides. which means you 
can have multiple config files, and you may wanna log
> errors. you can also use a config manager as a config file in another config 
manager, which is where the error logging gets a bit
weirder.
> I'm currently returning lists of errors, but another option would be to yield 
the errors instead. but, I'm actually not sure what
the best
> approach here is. so yeah. I can't *use* that motivating example, because if 
I did, everyone would dismiss me as crazy. (which I
am,
> but please don't dismiss me based on that :/)
> > >
> > Maybe you could start by actually writing the code, and then demonstrate 
how your idea would make the code easier to read or
> understand, or less error prone, or whatever other improvement it would bring.
> > that thing about wrapping things from other generators and returning the
> number of generators I messed with?
> > yeah. that's what I wanted to do. it doesn't do any of those things,
> it's just fun.


I think I will stop replying to this thread, since we aren't getting anywhere.  
Either I'm a poor communicator or someone else is a
poor listener.  Either way, my attempts to constructively approach this thread 
are failing.
--Edwin


this code:

def foo(self):
  for x in self.things:
    for y in x.foo():
      yield Wrap(y)
    else with z:
      yield z
  return len(things)

this is what it'd look like. and it'd be fun. the point of it is to be fun. it's a nuisance to actually use the results but if you're just printing them out (which is what I'd do) it's fine.

if you don't want me telling you, maybe don't ask.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7LPHFR7WGB6WNFA77E3MGKSYABR3WTSX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to