Re: A question on modification of a list via a function invocation

2017-08-15 Thread Fred Stluka



Here is my attempt to clarify the situation with some ascii graphics.
(Well, not ascii, but utf-8 box-drawing characters — I hope they come 
through ok.

And, of curse, it won't display properly with a proportional font.)

Here's a VERY useful tool for understanding/explaining/drawing
such code snippets:
- http://pythontutor.com

At the "Edit code" link, you can type/paste your own Python
statements and have the tool single-step though them.  At each
step, it draws the data structures with values, links to other data
structures, etc.  A great Python visualization tool!

Enjoy!
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


--
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python - Career question

2017-06-08 Thread Fred Stluka
   On 6/6/17 5:39 PM, [1]pta...@gmail.com wrote:

 New to Python and have been at it for about a month now. I'm doing well and 
like it very much. Considering a career change down the road and have been 
wondering... What are the job prospects for a middle age entry level 
programmer. Just trying to get a better understanding where I stand career 
wise.  Appreciate all feed back. Thanks!

   Are you asking about job prospects based on experience with Python
   vs other languages?

   If so, here's a site that shows the relative demand for various
   programming languages over time.  Based on its huge database of
   job listings.  Also shows the relative supply of programmers in
   various languages over time.  You can specify which languages
   or other marketable skills to show in the graph:
   -
   
[2]https://www.indeed.com/jobtrends/q-python-q-ruby-q-php-q-javascript-q-java-q-perl.html

   Hope this helps,
   --Fred

   --

   Fred Stluka -- [3]mailto:f...@bristle.com -- [4]http://bristle.com/~fred/
   Bristle Software, Inc -- [5]http://bristle.com -- Glad to be of service!
   Open Source: Without walls and fences, we need no Windows or Gates.

   --

References

   Visible links
   1. mailto:pta...@gmail.com
   2. 
https://www.indeed.com/jobtrends/q-python-q-ruby-q-php-q-javascript-q-java-q-perl.html
   3. mailto:f...@bristle.com
   4. http://bristle.com/~fred/
   5. http://bristle.com/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Emacs command to select only lines indented below a specified level

2017-05-25 Thread Fred Stluka

Ben,

Excellent answer!  Thanks!

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


On 5/23/17 6:46 PM, Ben Finney wrote:

Fred Stluka <f...@bristle.com> writes:


On 5/23/17 4:43 PM, Ben Finney wrote:


The ‘set-selective-display’ command […] is bound to ‘C-x $’ in
default Emacs.

How do I specify the number of columns when using "C-x $"?

You will remember, from doing the Emacs tutorial when you first learned
Emacs, that all commands have a “prefix argument” available
<URL:https://www.emacswiki.org/emacs/PrefixArgument> that the command
can use to modify its behaviour.

So, use the prefix argument to specify the number of columns for
‘set-selective-display’.

E.g.:

 M-9 C-x $  # Indentation >= 9 disappears.
 C-u C-x $  # Indentation >= 4 disappears.
 C-u 1 3 C-x $  # Indentation >= 13 disappears.
 C-u C-u C-u $  # Indentation >= 64 disappears.
 C-x $  # All lines reappear.

etc.


Same for using the command at the M-x prompt. I type "M-x" and see the
M-x prompt, then then type "set-selective-display" using tab to
autocomplete it. But I can't then type a column number after a space
or in parens or anything. What am I missing?

Time to work through the Emacs tutorial again; ‘C-h t’ :-)



--
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-23 Thread Fred Stluka

On 5/23/17 4:43 PM, Ben Finney wrote:


The ‘set-selective-display’ command will collapse the current buffer's
text to lines indented to the specified number of columns; the same
command with no argument will expand the buffer to normal again. The
command is bound to ‘C-x $’ in default Emacs.

Ben,

How do I specify the number of columns when using "C-x $"?  It
doesn't prompt, and doesn't seem to take the current column of
the cursor position into account.  Just echoes:
selective-display set to nil.

Same for using the command at the M-x prompt.  I type "M-x"
and see the M-x prompt, then then type "set-selective-display"
using tab to autocomplete it.  But I can't then type a column
number after a space or in parens or anything.  What am I missing?

Thanks,
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.



--
https://mail.python.org/mailman/listinfo/python-list


Recommended courses/materials for Python/Django course...

2016-06-15 Thread Fred Stluka
   Python programmers,

   Any Python and/or Django courses/materials to recommend?

   I may be teaching a Python/Django class soon.  My client may be
   willing to jumpstart by buying existing course materials (lecture
   slides, notes, homeworks, labs, reference links, any other materials).
   We'll certainly be happy to make use of any free materials.

   Do you have any Python and/or Django courses/materials to
   recommend?

   I've taken a quick look and found:
   - Main web sites:
 - [1]http://python.org
 - [2]https://djangoproject.com (excellent docs and tutorial!)
   - Free courses:
 - [3]https://developers.google.com/edu/python
   - Free/paid courses:
 - [4]http://learnpythonthehardway.org/book
   - Books
 - 2 Scoops of Django
   - Paid courses:
 - Coursera
 - Codecademy
 - Khan Academy
 - Udacity
 - edX
 - Alison
 - Lynda
 - NewCircle.com

   Any advice?  Thanks!
   --Fred

   --

   Fred Stluka -- [5]mailto:f...@bristle.com -- [6]http://bristle.com/~fred/
   Bristle Software, Inc -- [7]http://bristle.com -- Glad to be of service!
   Open Source: Without walls and fences, we need no Windows or Gates.

   --

References

   Visible links
   1. http://python.org/
   2. https://djangoproject.com/
   3. https://developers.google.com/edu/python
   4. http://learnpythonthehardway.org/book
   5. mailto:f...@bristle.com
   6. http://bristle.com/~fred/
   7. http://bristle.com/
-- 
https://mail.python.org/mailman/listinfo/python-list