Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84583

Re: Idiomatic backtracking in Python

Date 2015-01-26 00:43 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: Idiomatic backtracking in Python
References <ma3itj$ol6$1@news.albasani.net> <8561bumlfb.fsf@benfinney.id.au>
Newsgroups comp.lang.python
Message-ID <mailman.18137.1422233013.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2015-01-26 00:32, Ben Finney wrote:
> Johannes Bauer <dfnsonfsduifb@gmx.de> writes:
>
>> So, I would like to ask if you have a Pythonic approach to
>> backtracking problems? If so, I'd love to hear your solutions!
>
> I'm not aware of what the problem is. “Back-tracking” doesn't have a
> general meaning I recognise beyond random access into a data structure.
> So a Python list is the obvious starting point.
>
> Do you have a specific meaning of “back-tracking” that implies
> particular problems that are difficult to solve?
>
I believe he's talking about trying different alternatives until one
works. You get it in matching regexes (well, when using the NFA
approach as used in the re module, Perl regexes, etc, anyway).

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Idiomatic backtracking in Python Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-01-25 21:15 +0100
  Re: Idiomatic backtracking in Python Ian Foote <ian@feete.org> - 2015-01-25 20:51 +0000
    Re: Idiomatic backtracking in Python Rustom Mody <rustompmody@gmail.com> - 2015-01-25 18:41 -0800
      Re: Idiomatic backtracking in Python Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-01-26 09:21 +0200
        Re: Idiomatic backtracking in Python Rustom Mody <rustompmody@gmail.com> - 2015-01-25 23:28 -0800
  Re: Idiomatic backtracking in Python Ben Finney <ben+python@benfinney.id.au> - 2015-01-26 11:32 +1100
    Re: Idiomatic backtracking in Python Marko Rauhamaa <marko@pacujo.net> - 2015-01-26 03:31 +0200
      Re: Idiomatic backtracking in Python Chris Angelico <rosuav@gmail.com> - 2015-01-26 12:45 +1100
      Re: Idiomatic backtracking in Python Dave Angel <davea@davea.name> - 2015-02-03 16:16 -0500
      Re: Idiomatic backtracking in Python Chris Angelico <rosuav@gmail.com> - 2015-02-04 09:29 +1100
  Re: Idiomatic backtracking in Python MRAB <python@mrabarnett.plus.com> - 2015-01-26 00:43 +0000
  Re: Idiomatic backtracking in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-26 08:06 +0000
  Re: Idiomatic backtracking in Python sjmsoft@gmail.com - 2015-01-27 04:48 -0800

csiph-web