So many times I learn or correct my knowledge of things when I’m doing code reviews. TIL that I was under the incorrect assumption that map() would skip over null or undefined array entries. I was wrong. It makes sense in hindsight. Especially since it's in the first line of the documentation. 🤦‍♀️

MDN Docs

The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.

The built-in linter doesn’t do well with turtle. You can choose a different linter like flake8. However, you’ll trade off one annoying thing for a different annoying thing. Choose your poison.

  • Open the command palette (⌘ + Shift + P)
  • Select “Python: Select Linter”
  • Choose “flake8”
  • If you’ve never used that before, you’ll be prompted to install it with a prompt similar to this
  • Do that and restart VS Code
  • Now you can get the red squiggles to go away on the turtle function names by explicitly naming them in multiple import statements (this is the annoying thing about the fix).

Lisa R Dean

Imposter Programmer. Former sysadmin. Still on the impossible childhood quest to know everything.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store