[elinks-dev] Remove current_url parameter of Python goto_url_hook?
levinsm at users.sourceforge.net
Tue Jan 2 09:30:04 PST 2007
On Jan 01, 2007, at 6:58pm, Kalle Olavi Niemitalo writes:
>I applied the patch as 26473f72f59641aa60277f14f703f8a76dda5a82,
>so that users of snapshots will notice it and can complain if
>they don't like it.
Sounds good. I think it should be straightforward for a snapshot user to
fix hooks.py (by removing the second argument to goto_url_hook() and calling
elinks.current_url() if needed), but if anyone has further questions I'll
be happy to help.
>Do you anticipate having to add more arguments to the hooks in
>the future; should we advise users to write hooks in such a way
>that they ignore extra arguments?
I don't expect this to be an issue. Instead of adding new arguments to the
hooks, it will be simpler and more flexible to make any additional data
available to them by extending the API of the embedded interpreter's builtin
elinks module. In other words, rather than adding a new argument "foo" to
any given hook, Python users should be provided with a new function
"elinks.get_foo()" that can then be called from whichever hooks they want.
More information about the elinks-dev