GentBG - why bother to burn STEEM?

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-why-bother-to-burn-steem GentBG - a new experiment to burn STEEM Hello, this is @joviansummer(witness: @jswit). I'd like to briefly explain why I bothered to start @gentbg experiment. Unlike bitcoin, STEEM has no supply limit. As long as STEEM exists, newly minted STEEM will be added to total supply. If we can't maintain corresponding demand or reduce supply, downward pressure on STEEM price can be a big challenge. @gentbg project is an experiment to reduce STEEM supply by burning. @gentbg will burn liquid author reward and delegate SP reward to @jsup to get amplified upvotes. The main purpose is to create a perpetual STEEM burning loop. I added a bit of fun factor via AI-generated images, to incentivize giving upvotes to @gentbg's posts. If you have some spare voting power, you can contribute to burning STEEM by giving upvotes to @gentbg's posts. Initial run of this experiment wil...

파이썬에서 예외(exception) 처리

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/exception


파이썬에서의 예외(exception) 처리 예시입니다. try와 except 구문을 사용합니다.

예를 들어 어떤 수를 0으로 나누려 할 경우 예외가 발생할 것입니다.

try:
  x = 100/0
except:
  print("예외가 발생했습니다.")

위의 코드를 실행하면 "예외가 발생했습니다."라는 문자열이 출력될 것입니다.

어떤 예외가 발생했는지 출력하고 싶다면 아래와 같이 할 수 있습니다.

try:
  x = 100/0
except Exception as e:
  exc_str = str(e)
  print(exc_str)

위의 코드를 실행하면 예외 발생 메시지 "division by zero"가 출력될 것입니다.

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기