Comments (2)
Couldn't get the entire block of code to formate correctly(for statement should be in the code block) but I think it still makes sense.
from pcc.
Have you seen the updates section in the online resources? There's an update for this issue here.
You and I came up with similar approaches. Here's what I wrote for the update:
names, plot_dicts = [], []
for repo_dict in repo_dicts:
names.append(repo_dict['name'])
# Some projects lack a description, which causes an error when
# labeling bars. Specify a label if there's no description.
description = repo_dict['description']
if not description:
description = "No description provided."
plot_dict = {
'value': repo_dict['stargazers_count'],
'label': description,
}
plot_dicts.append(plot_dict)
We pull the description from the repo_dict, and then change the description if none is provided. We don't change the repo_dict itself. Same result though, so nice work troubleshooting!
Couldn't get the entire block of code to formate correctly(for statement should be in the code block) but I think it still makes sense.
You can start a code block with triple backticks followed by python, and close the code block with another set of triple backticks. This formats your code with python syntax highlighting. I edited the formatting of your code block with this style.
from pcc.
Related Issues (20)
- Chapter 17. hn_submissions.py, KeyError HOT 3
- Chapter 12, differences in book and repository code HOT 2
- Chapter 13 - The Aliens cannot move in the X axis HOT 2
- Chapter10: remenber_me.py JSONDecodeError HOT 1
- Missing license HOT 2
- Chapter 11, test_name_function.py - "if __name__ == '__main__'" missing HOT 1
- ch12 somewhere i don't understand,please help me! HOT 3
- Chapter 18 urls.py incompatible with Django2 HOT 2
- On MacOS, Chapter 12, I don't see a spaceship HOT 5
- Chapter 16 pygal_maps_world 1.02 HOT 1
- chapter17 python_repos.py HOT 3
- Chapter12/bullet.py, the bullet appears in the top of screen HOT 1
- Chapter 10. Task 10-6. Addition. HOT 1
- Several interface changed in python. HOT 1
- D6+D10 HOT 1
- Chapter 19 - cannot import name 'login' from 'django.contrib.auth.views' HOT 1
- chapter_14/button.py HOT 1
- learning_logs.url preventing server from starting HOT 1
- Chapter 10 : Birthday in Pi HOT 1
- Chapter 17 Status code 425 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcc.