I use .pdbrc file to help debugging. To avoid editing this file frequently when
source was modified, I need this feature.
I modify the checkline function in pdb.py from
...
line = linecache.getline(filename, lineno, globs)
if not line:
to
...
lines = linecache.get
On 2020-12-13 00:01, Bischoop wrote:
Here https://bpa.st/YBVA I've working code with dictionary only if used dict
from the code
(it's commented now) but when I load it I can print it from load
function (line 14) but at all have not a
clue how to pass the data so could use them.
I've learnt a
On Sat, Dec 12, 2020 at 4:05 PM Bischoop wrote:
>
> Here https://bpa.st/YBVA I've working code with dictionary only if used
> dict from the code
> (it's commented now) but when I load it I can print it from load
> function (line 14) but at all have not a
> clue how to pass the data so could use
On 2020-12-12, Tim Chase wrote:
>
> Hopefully this gives you the hints that you need to troubleshoot.
>
> -tkc
>
>
>
>
Yes it explains a lot.
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
Here https://bpa.st/YBVA I've working code with dictionary only if used dict
from the code
(it's commented now) but when I load it I can print it from load
function (line 14) but at all have not a
clue how to pass the data so could use them.
I've learnt a lot when making it but here I'm comple
On 13/12/20 5:46 am, ast wrote:
Here is a code where it would be useful. This code looks for a
path in a graph.
Recursion is probably not the best way to solve this problem in
CPython, because it imposes a limit on the number of nested calls
(in order to detect runaway recursion). By default th
On 12Dec2020 17:46, ast wrote:
>Le 12/12/2020 à 09:18, Cameron Simpson a écrit :
>>On 12Dec2020 07:39, ast wrote:
>>>In case a function recursively calls itself many times,
>>>is there a way to return a data immediately without
>>>unstacking all functions ?
>>
>>Not really. Do you have an example
On 13/12/2020 05:46, ast wrote:
Le 12/12/2020 à 09:18, Cameron Simpson a écrit :
On 12Dec2020 07:39, ast wrote:
In case a function recursively calls itself many times,
is there a way to return a data immediately without
unstacking all functions ?
Not really. Do you have an example where this
Bischoop writes:
> On 2020-12-12, Joe Pfeiffer wrote:
>> Bischoop writes:
>>
>>> I've function asking question and comparing it, if is not matching 'yes'
>>> it does call itself to ask question again. The problem is that when
>>> function is called second time it returns old value or with addit
On 2020-12-12 at 10:51:00 -0600,
Tim Chase wrote:
> If you want numeric-range checks, Python provides the lovely
> double-comparison syntax:
>
> >>> x = 5
> >>> 2 < x < 10
> True
Not just numbers:
>>> 'm' < 'n' < 'o'
True
>>> 'one' < 'one point five' < 'two'
True
Okay,
As always, it may be useful to know WHY the questioner wants to skip
intermediate functions already in progress and jump back to some unspecified
earlier level.
There is a reason why functions are "stacked" and there are data structures
that really may need to be unwound. But if the question is no
ast wrote at 2020-12-12 07:39 +0100:
>In case a function recursively calls itself many times,
>is there a way to return a data immediately without
>unstacking all functions ?
Python does not have "long jump"s (out of many functions, many loop
incarnations).
In some cases, you can use exceptions to
On 2020-12-12 15:12, Bischoop wrote:
> I need to check if input number is 1-5. Whatever I try it's not
> working. Here are my aproaches to the problem: https://bpa.st/H62A
>
> What I'm doing wrong and how I should do it?
A range is similar to a list in that it contains just the numbers
listed:
On 2020-12-12 07:39, ast wrote:
> In case a function recursively calls itself many times,
> is there a way to return a data immediately without
> unstacking all functions ?
Not that I'm aware of. If you use recursion (and AFAIK, Python
doesn't support tail-recursion), you pay all the pushes & pa
Le 12/12/2020 à 09:18, Cameron Simpson a écrit :
On 12Dec2020 07:39, ast wrote:
In case a function recursively calls itself many times,
is there a way to return a data immediately without
unstacking all functions ?
Not really. Do you have an example where this is inconvenient?
There are alte
Le 12/12/2020 à 17:10, Oscar a écrit :
In article <5fd465b5$0$8956$426a7...@news.free.fr>, ast wrote:
Hello
In case a function recursively calls itself many times,
is there a way to return a data immediately without
unstacking all functions ?
If you are referring to your "are you ok?" probl
Got it solved here: https://bpa.st/BFJA
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
Bischoop wrote:
>
>I need to check if input number is 1-5. Whatever I try it's not working.
>Here are my aproaches to the problem: https://bpa.st/H62A
>
>What I'm doing wrong and how I should do it?
You need to learn about types. ;-)
Input returns a string. That string is not in th
I need to check if input number is 1-5. Whatever I try it's not working.
Here are my aproaches to the problem: https://bpa.st/H62A
What I'm doing wrong and how I should do it?
--
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
I've also convert the choice to int() but doesn't help.
--
https://mail.python.org/mailman/listinfo/python-list
In article <5fd465b5$0$8956$426a7...@news.free.fr>, ast wrote:
>Hello
>
>In case a function recursively calls itself many times,
>is there a way to return a data immediately without
>unstacking all functions ?
If you are referring to your "are you ok?" problem, please read up on
recursion and wh
On 2020-12-12, Oscar wrote:
> In article ,
> Bischoop wrote:
>>I've also convert the choice to int() but doesn't help.
>
> Oh.. did not read this yet. How did you do this? In both places after
> the input or during the comparison? If so, in which version? Only the
> first version would work. The
In article ,
Bischoop wrote:
>I've also convert the choice to int() but doesn't help.
Oh.. did not read this yet. How did you do this? In both places after
the input or during the comparison? If so, in which version? Only the
first version would work. The other two are just plain wrong.
--
[J|O
On 12Dec2020 01:49, Bischoop wrote:
>On 2020-12-07, Grant Edwards wrote:
>> On 2020-12-07, MRAB wrote:
>>> Avoid a 'bare' except unless you _really_ mean it, which is
>>> virtually never. Catch only those exceptions that you're going to
>>> handle.
>>
>> And sometimes "handling" is just printing
On 12Dec2020 07:39, ast wrote:
>In case a function recursively calls itself many times,
>is there a way to return a data immediately without
>unstacking all functions ?
Not really. Do you have an example where this is inconvenient?
There are alternatives, for example passing in a Queue and put()
25 matches
Mail list logo